diff options
author | Fernando Reyes (likewhoa) <design@missionaccomplish.com> | 2014-08-17 02:18:36 +0200 |
---|---|---|
committer | Fernando Reyes (likewhoa) <design@missionaccomplish.com> | 2014-08-17 02:18:36 +0200 |
commit | c33f10738a4880cd6d9cf2048df4809eaf04b19a (patch) | |
tree | 6a0903f7ccb63c91e16cd9a6c2b4f91762c5d972 | |
parent | Fixed a bug which prevented aufs.modules from functioning properly (diff) | |
download | genkernel-c33f10738a4880cd6d9cf2048df4809eaf04b19a.tar.gz genkernel-c33f10738a4880cd6d9cf2048df4809eaf04b19a.tar.bz2 genkernel-c33f10738a4880cd6d9cf2048df4809eaf04b19a.zip |
restructure no_umounts from being set in /etc/rc.conf to /etc/conf.d/localmount
-rwxr-xr-x | defaults/initrd.defaults | 2 | ||||
-rw-r--r-- | defaults/initrd.scripts | 15 |
2 files changed, 8 insertions, 9 deletions
diff --git a/defaults/initrd.defaults b/defaults/initrd.defaults index 818e3b16..7e4803a4 100755 --- a/defaults/initrd.defaults +++ b/defaults/initrd.defaults @@ -60,7 +60,7 @@ KSUFF='.ko' REAL_ROOT='' CONSOLE='/dev/console' NEW_ROOT='/newroot' -RC_NO_UMOUNTS='/newroot|/mnt/aufs-dev|/mnt/aufs-rw-branch|/mnt/livecd|/mnt/cdrom|/.unions/memory|/.unions/memory/xino' +no_umounts='/newroot|/mnt/aufs-dev|/mnt/aufs-rw-branch|/mnt/livecd|/mnt/cdrom|/.unions/memory|/.unions/memory/xino' CDROOT='0' CDROOT_DEV='' CDROOT_TYPE='auto' diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 7d9497d6..7b8e52ff 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -323,13 +323,12 @@ union_mod() { union_insert_dir "$aufs_union" "$aufs_union"/mnt/modules/"$mod" } -# Implements RC_NO_UMOUNTS variable into $CHROOT/etc/rc.conf for a cleaner shutdown process -# This should really go into /etc/init.d/localmounts but until then we manually set this here +# Implements no_umounts variable into $CHROOT/etc/conf.d/localmount for a cleaner shutdown process conf_rc_no_umounts() { local conf nomount fnd - conf=$CHROOT/etc/rc.conf fnd=0 + conf=$CHROOT/etc/conf.d/localmount fnd=0 - if nomount=$(grep -n '^[[:blank:]]*RC_NO_UMOUNTS=' $conf); then + if nomount=$(grep -n '^[[:blank:]]*no_umounts=' $conf); then local i n data cmd IFS IFS=' ' @@ -341,20 +340,20 @@ conf_rc_no_umounts() { data=${i#*=} case $data in - "\"$RC_NO_UMOUNTS\""|"'$RC_NO_UMOUNTS'") fnd=1;; + "\"$no_umounts\""|"'$no_umounts'") fnd=1;; *) cmd="$cmd$n d;" esac done if [ -n "$cmd" ]; then sed -i "${cmd%;}" $conf - test_success "Unable to edit rc.conf" + test_success "Unable to edit /etc/conf.d/localmount" fi fi if [ 0 -eq "$fnd" ]; then - printf 'RC_NO_UMOUNTS="%s"\n' "$RC_NO_UMOUNTS" >> $conf - test_success "Unable to write to rc.conf" + printf 'no_umounts="%s"\n' "$no_umounts" >> $conf + test_success "Unable to write to /etc/conf.d/localmount" fi } |