From 43c3c737ae7dc7c89d46359e8cd2ada2bc281f5b Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Mon, 20 Oct 2008 14:31:52 -0700 Subject: Bugfix: 3687: Only start mdadm if we have a RAID group as root filesystem. --- scripts/install-system | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'scripts/install-system') diff --git a/scripts/install-system b/scripts/install-system index f5484e9a..ff7a5d41 100644 --- a/scripts/install-system +++ b/scripts/install-system @@ -1320,6 +1320,21 @@ if [ -z $UNION ]; then sed -i 's/requisite[ \t][ \t]*pam_securetty.so/required pam_securetty.so/' $rootfsdir/etc/pam.d/login fi +# +# 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 +# ever gets set up, we can do this configuration here. +# +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 + else + sed -i 's/^START_DAEMON.*$/START_DAEMON=false/' $MDADM_CONFIG_FILE + fi +fi + + # postinst hook if [ -e /opt/vyatta/etc/install-system/postinst ]; then echo "running post-install script" -- cgit v1.2.3