diff options
author | Yoann Vandoorselaere <yoann@mandriva.com> | 1999-12-01 11:39:58 +0000 |
---|---|---|
committer | Yoann Vandoorselaere <yoann@mandriva.com> | 1999-12-01 11:39:58 +0000 |
commit | 3e51d5bb01c84dff7fe1b114c2f1e281bdf2219d (patch) | |
tree | acbcb16ee5923073dc64a9353a616f7debe1505c /init-sh/lib.sh | |
parent | 6b9df4eac57b3b7118aa3f680913f623e8cedfe1 (diff) | |
download | msec-3e51d5bb01c84dff7fe1b114c2f1e281bdf2219d.tar msec-3e51d5bb01c84dff7fe1b114c2f1e281bdf2219d.tar.gz msec-3e51d5bb01c84dff7fe1b114c2f1e281bdf2219d.tar.bz2 msec-3e51d5bb01c84dff7fe1b114c2f1e281bdf2219d.tar.xz msec-3e51d5bb01c84dff7fe1b114c2f1e281bdf2219d.zip |
Now preserve file indentation
Diffstat (limited to 'init-sh/lib.sh')
-rw-r--r-- | init-sh/lib.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/init-sh/lib.sh b/init-sh/lib.sh index d9e7107..499e81e 100644 --- a/init-sh/lib.sh +++ b/init-sh/lib.sh @@ -48,8 +48,8 @@ AddRules () { fi if ! grep -Eqx "^${string}" ${file}; then - echo "${COMMENT}" >> ${file}; - echo "${string}" >> ${file}; + echo -e "${COMMENT}" >> ${file}; + echo -e "${string}" >> ${file}; fi if [ -z ${3} ]; then echo -e "done.\n" @@ -64,6 +64,8 @@ CleanRules() { mv -f ${file} /tmp/secure.tmp touch ${file} + IFS=" +" while read line; do if [ ${ctrl} == 1 ]; then ctrl=0 @@ -78,7 +80,8 @@ CleanRules() { echo "${line}" >> ${file} fi done < /tmp/secure.tmp - + IFS=" " + rm -f /tmp/secure.tmp echo "done." @@ -122,7 +125,7 @@ LiloUpdate() { echo "Do you want a password authentication at boot time ?" echo "Be very carefull," echo "this will prevent your server to reboot without an operator to enter password". - WaitAnswer + WaitAnswer; if [ "${answer}" == "yes" ]; then echo -n "Please enter the password which will be used at boot time : " read password |