summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2011-12-02 14:44:24 -0800
committerStephen Hemminger <shemminger@vyatta.com>2011-12-02 14:44:24 -0800
commite8c8ebfc74203309871d4f291a378565f7ca4181 (patch)
treee819b26934e3e1f470048b3c717d11feb9b252c4
parent45628b369caa67c089f0984d31567df07d966b3e (diff)
downloadvyatta-cfg-quagga-e8c8ebfc74203309871d4f291a378565f7ca4181.tar.gz
vyatta-cfg-quagga-e8c8ebfc74203309871d4f291a378565f7ca4181.zip
md: don't start unless needed
Don't start RAID (md) unless root device is configured for RAID.
-rw-r--r--debian/vyatta-cfg-system.postinst.in4
-rwxr-xr-xscripts/install-system6
-rwxr-xr-xscripts/install/install-postinst-new12
3 files changed, 10 insertions, 12 deletions
diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in
index 6ce0a870..cc412632 100644
--- a/debian/vyatta-cfg-system.postinst.in
+++ b/debian/vyatta-cfg-system.postinst.in
@@ -190,11 +190,11 @@ password requisite pam_succeed_if.so user = root
' /etc/pam.d/passwd
fi
-#
# Ask mdadm to call our own event handling daemon
-#
+# Don't start mdadm daemon when running on livecd
if [ -e /etc/default/mdadm ]; then
sed -i 's+^DAEMON_OPTIONS=.*$+DAEMON_OPTIONS="--syslog --program /opt/vyatta/sbin/vyatta-raid-event"+' /etc/default/mdadm
+ sed -i 's/^START_DAEMON.*$/START_DAEMON=false/' /etc/default/mdadm
fi
# remove unnecessary ddclient script in /etc/ppp/ip-up.d/
diff --git a/scripts/install-system b/scripts/install-system
index cfa31515..63a5d3d5 100755
--- a/scripts/install-system
+++ b/scripts/install-system
@@ -1599,9 +1599,11 @@ fi
MDADM_CONFIG_FILE=$rootfsdir/etc/default/mdadm
if [ -e $MDADM_CONFIG_FILE ]; then
if [ ${INSTALL_DRIVE:0:2} = "md" ]; then
- sed -i 's/^START_DAEMON.*$/START_DAEMON=true/' $MDADM_CONFIG_FILE
+ sed -i -e 's/^START_DAEMON.*$/START_DAEMON=true/' \
+ -e 's/^AUTOSTART=.*$/AUTOSTART=true/' $MDADM_CONFIG_FILE
else
- sed -i 's/^START_DAEMON.*$/START_DAEMON=false/' $MDADM_CONFIG_FILE
+ sed -i -e 's/^START_DAEMON.*$/START_DAEMON=false/' \
+ -e 's/^AUTOSTART=.*$/AUTOSTART=false/' $MDADM_CONFIG_FILE
fi
fi
diff --git a/scripts/install/install-postinst-new b/scripts/install/install-postinst-new
index 2a9539c6..59b255b2 100755
--- a/scripts/install/install-postinst-new
+++ b/scripts/install/install-postinst-new
@@ -223,12 +223,6 @@ install_grub
# Perform additional configuration if installing on Xen
check_for_xen_extras
-# Fix up PAM configuration for login so that invalid users are prompted
-# for password
-# XXX is this still needed? can't find this in the files any more.
-sed -i 's/requisite[ \t][ \t]*pam_securetty.so/required pam_securetty.so/' \
- ${INST_ROOT}/etc/pam.d/login
-
#
# Only start the mdadm daemon if we have the root filesystem running
# on a RAID set. Since this script is the only way that the root filesystem
@@ -237,9 +231,11 @@ sed -i 's/requisite[ \t][ \t]*pam_securetty.so/required pam_securetty.so/' \
MDADM_CONFIG_FILE=${INST_ROOT}/etc/default/mdadm
if [ -f "$MDADM_CONFIG_FILE" ]; then
if [ "${INSTALL_DRIVE:0:2}" = "md" ]; then
- sed -i 's/^START_DAEMON.*$/START_DAEMON=true/' $MDADM_CONFIG_FILE
+ sed -i -e 's/^START_DAEMON.*$/START_DAEMON=true/' \
+ -e 's/^AUTOSTART=.*$/AUTOSTART=true/' $MDADM_CONFIG_FILE
else
- sed -i 's/^START_DAEMON.*$/START_DAEMON=false/' $MDADM_CONFIG_FILE
+ sed -i -e 's/^START_DAEMON.*$/START_DAEMON=false/' \
+ -e 's/^AUTOSTART=.*$/AUTOSTART=true/' $MDADM_CONFIG_FILE
fi
fi