diff options
author | Yoann Vandoorselaere <yoann@mandriva.com> | 2000-04-19 09:54:29 +0000 |
---|---|---|
committer | Yoann Vandoorselaere <yoann@mandriva.com> | 2000-04-19 09:54:29 +0000 |
commit | 1aa24bce3e5db88620ede6130f272d76b64bf426 (patch) | |
tree | 5e9fe4993e13e1d15c10c12060f82ad74cec727f /init-sh/lib.sh | |
parent | 7838530faed4e5d7644c5dd0ed2275b27081a0ea (diff) | |
download | msec-1aa24bce3e5db88620ede6130f272d76b64bf426.tar msec-1aa24bce3e5db88620ede6130f272d76b64bf426.tar.gz msec-1aa24bce3e5db88620ede6130f272d76b64bf426.tar.bz2 msec-1aa24bce3e5db88620ede6130f272d76b64bf426.tar.xz msec-1aa24bce3e5db88620ede6130f272d76b64bf426.zip |
*** empty log message ***
Diffstat (limited to 'init-sh/lib.sh')
-rw-r--r-- | init-sh/lib.sh | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/init-sh/lib.sh b/init-sh/lib.sh index 7b395a7..bf4de47 100644 --- a/init-sh/lib.sh +++ b/init-sh/lib.sh @@ -133,7 +133,19 @@ Ttylog() { } -LiloUpdate() { +LoaderUpdate() { + loader=/usr/sbin/detectloader + case "${loader}" in + "LILO") + file="/etc/lilo.conf" + at_exit="/sbin/lilo" + ;; + "GRUB") + file="/boot/grub/menu.lst" + at_exit="" + ;; + esac + if [[ ${LILO_PASSWORD+set} != set ]]; then echo "Do you want a password authentication at boot time ?" echo "Be very carefull," @@ -152,13 +164,32 @@ LiloUpdate() { if [[ ! -z ${password} ]]; then tmpfile=`mktemp /tmp/secure.XXXXXX` - cp /etc/lilo.conf ${tmpfile} - cat ${tmpfile} | grep -v password > /etc/lilo.conf + cp ${file} ${tmpfile} + cat ${tmpfile} | grep -v password > ${file} rm -f ${tmpfile} clear - AddBegRules "password=$password" /etc/lilo.conf + AddBegRules "password=$password" ${file} fi + + ${at_exit}; +} + +CleanLoaderRule() { + loader=/usr/sbin/detectloader + case "${loader}" in + "LILO") + file="/etc/lilo.conf" + at_exit="/sbin/lilo" + ;; + "GRUB") + file="/boot/grub/menu.lst" + at_exit="" + ;; + esac + + CleanRules ${file} + ${at_exit}; } # If we are currently installing our @@ -180,7 +211,7 @@ CommentUserRules /etc/securetty CleanRules /etc/security/msec/security.conf CommentUserRules /etc/security/msec/security.conf CleanRules /etc/profile -CleanRules /etc/lilo.conf +CleanLoaderRules CleanRules /etc/logrotate.conf CleanRules /etc/rc.d/rc.local CleanRules /etc/rc.d/rc.firewall |