OSDN Git Service

fixed systemctl and umount
authorkokkiemouse <kokkiemouse@gmail.com>
Sun, 20 Sep 2020 00:03:47 +0000 (09:03 +0900)
committerkokkiemouse <kokkiemouse@gmail.com>
Sun, 20 Sep 2020 00:03:47 +0000 (09:03 +0900)
Signed-off-by: kokkiemouse <kokkiemouse@gmail.com>
channels/share/airootfs/root/customize_airootfs.sh
lfbs

index 5cfcfd4..82a6ecc 100755 (executable)
@@ -74,6 +74,13 @@ Defaults pwfeedback
 EOF
 echo "${username} ALL=NOPASSWD: ALL" >> /etc/sudoers.d/fedoralive
 echo "root ALL=NOPASSWD: ALL" >> /etc/sudoers.d/fedoralive
+echo "#!/usr/bin/env bash" > "/etc/profile.d/alias_systemctl_setup.sh"
+echo "alias reboot=\"sudo reboot\"" >> "/etc/profile.d/alias_systemctl_setup.sh"
+echo "alias shutdown=\"sudo shutdown\"" >> "/etc/profile.d/alias_systemctl_setup.sh"
+echo "alias poweroff=\"sudo poweroff\"" >> "/etc/profile.d/alias_systemctl_setup.sh"
+echo "alias halt=\"sudo halt\"" >> "/etc/profile.d/alias_systemctl_setup.sh"
+chmod +x "/etc/profile.d/alias_systemctl_setup.sh"
+
 
 
 # Chnage sudoers permission
diff --git a/lfbs b/lfbs
index f9a0f65..03e9553 100755 (executable)
--- a/lfbs
+++ b/lfbs
@@ -495,12 +495,15 @@ trap  umount_chroot 0 2 15
 
 if [[ -n "${1}" ]]; then
     channel_name="${1}"
-
+    if [[ "${channel_name}" = "umount" ]]; then
+        umount_chroot_airootfs
+        exit 0
+    fi
     check_channel() {
         local channel_list
         local i
         channel_list=()
-
+        
         for _channel in $(ls -l "${channels_dir}" | awk '$1 ~ /d/ {print $9 }'); do
             if [[ -n $(ls "${channels_dir}/${_channel}") ]] && [[ ! "${_channel}" = "share" ]]; then
                 channel_list+=( "${_channel}" )