summaryrefslogtreecommitdiff
path: root/scripts/install-system
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2008-10-20 14:31:52 -0700
committerBob Gilligan <gilligan@vyatta.com>2008-10-20 14:31:52 -0700
commit43c3c737ae7dc7c89d46359e8cd2ada2bc281f5b (patch)
tree0240342d75360bc98be9fc1e9f6ccfef55b3e147 /scripts/install-system
parent523d1b674931a3bf8c97706d237da06b4b425e63 (diff)
downloadvyatta-cfg-system-43c3c737ae7dc7c89d46359e8cd2ada2bc281f5b.tar.gz
vyatta-cfg-system-43c3c737ae7dc7c89d46359e8cd2ada2bc281f5b.zip
Bugfix: 3687: Only start mdadm if we have a RAID group as root filesystem.
Diffstat (limited to 'scripts/install-system')
-rw-r--r--scripts/install-system15
1 files changed, 15 insertions, 0 deletions
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"