1 |
commit: 3ad1b69ab16292a28f03ed457e95ba221db7d654 |
2 |
Author: Fernando Reyes (likewhoa) <design <AT> missionaccomplish <DOT> com> |
3 |
AuthorDate: Sun Aug 17 00:18:36 2014 +0000 |
4 |
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 29 17:33:04 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=3ad1b69a |
7 |
|
8 |
restructure no_umounts from being set in /etc/rc.conf to /etc/conf.d/localmount |
9 |
|
10 |
defaults/initrd.defaults | 2 +- |
11 |
defaults/initrd.scripts | 15 +++++++-------- |
12 |
2 files changed, 8 insertions(+), 9 deletions(-) |
13 |
|
14 |
diff --git a/defaults/initrd.defaults b/defaults/initrd.defaults |
15 |
index f2cb42a..f6fd564 100755 |
16 |
--- a/defaults/initrd.defaults |
17 |
+++ b/defaults/initrd.defaults |
18 |
@@ -60,7 +60,7 @@ KSUFF='.ko' |
19 |
REAL_ROOT='' |
20 |
CONSOLE='/dev/console' |
21 |
NEW_ROOT='/newroot' |
22 |
-RC_NO_UMOUNTS='/newroot|/mnt/aufs-dev|/mnt/aufs-rw-branch|/mnt/livecd|/mnt/cdrom|/.unions/memory|/.unions/memory/xino' |
23 |
+no_umounts='/newroot|/mnt/aufs-dev|/mnt/aufs-rw-branch|/mnt/livecd|/mnt/cdrom|/.unions/memory|/.unions/memory/xino' |
24 |
CDROOT='0' |
25 |
CDROOT_DEV='' |
26 |
CDROOT_TYPE='auto' |
27 |
|
28 |
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts |
29 |
index d168b94..8edaea4 100644 |
30 |
--- a/defaults/initrd.scripts |
31 |
+++ b/defaults/initrd.scripts |
32 |
@@ -323,13 +323,12 @@ union_mod() { |
33 |
union_insert_dir "$aufs_union" "$aufs_union"/mnt/modules/"$mod" |
34 |
} |
35 |
|
36 |
-# Implements RC_NO_UMOUNTS variable into $CHROOT/etc/rc.conf for a cleaner shutdown process |
37 |
-# This should really go into /etc/init.d/localmounts but until then we manually set this here |
38 |
+# Implements no_umounts variable into $CHROOT/etc/conf.d/localmount for a cleaner shutdown process |
39 |
conf_rc_no_umounts() { |
40 |
local conf nomount fnd |
41 |
- conf=$CHROOT/etc/rc.conf fnd=0 |
42 |
+ conf=$CHROOT/etc/conf.d/localmount fnd=0 |
43 |
|
44 |
- if nomount=$(grep -n '^[[:blank:]]*RC_NO_UMOUNTS=' $conf); then |
45 |
+ if nomount=$(grep -n '^[[:blank:]]*no_umounts=' $conf); then |
46 |
local i n data cmd IFS |
47 |
IFS=' |
48 |
' |
49 |
@@ -341,20 +340,20 @@ conf_rc_no_umounts() { |
50 |
data=${i#*=} |
51 |
|
52 |
case $data in |
53 |
- "\"$RC_NO_UMOUNTS\""|"'$RC_NO_UMOUNTS'") fnd=1;; |
54 |
+ "\"$no_umounts\""|"'$no_umounts'") fnd=1;; |
55 |
*) cmd="$cmd$n d;" |
56 |
esac |
57 |
done |
58 |
|
59 |
if [ -n "$cmd" ]; then |
60 |
sed -i "${cmd%;}" $conf |
61 |
- test_success "Unable to edit rc.conf" |
62 |
+ test_success "Unable to edit /etc/conf.d/localmount" |
63 |
fi |
64 |
fi |
65 |
|
66 |
if [ 0 -eq "$fnd" ]; then |
67 |
- printf 'RC_NO_UMOUNTS="%s"\n' "$RC_NO_UMOUNTS" >> $conf |
68 |
- test_success "Unable to write to rc.conf" |
69 |
+ printf 'no_umounts="%s"\n' "$no_umounts" >> $conf |
70 |
+ test_success "Unable to write to /etc/conf.d/localmount" |
71 |
fi |
72 |
} |