aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Vandoorselaere <yoann@mandriva.com>1999-12-08 12:58:17 +0000
committerYoann Vandoorselaere <yoann@mandriva.com>1999-12-08 12:58:17 +0000
commit91ca84169787065e6263543033e3b64d678e431b (patch)
tree03b7c52006ea86c2f8b69bc0385c53df1a395579
parentf3a6af93b8bfce5ce038fe7ea0dcc304b92f626b (diff)
downloadmsec-91ca84169787065e6263543033e3b64d678e431b.tar
msec-91ca84169787065e6263543033e3b64d678e431b.tar.gz
msec-91ca84169787065e6263543033e3b64d678e431b.tar.bz2
msec-91ca84169787065e6263543033e3b64d678e431b.tar.xz
msec-91ca84169787065e6263543033e3b64d678e431b.zip
*** empty log message ***
-rw-r--r--init-sh/lib.sh20
1 files changed, 14 insertions, 6 deletions
diff --git a/init-sh/lib.sh b/init-sh/lib.sh
index b429fec..302cebc 100644
--- a/init-sh/lib.sh
+++ b/init-sh/lib.sh
@@ -46,12 +46,13 @@ CleanRules() {
file=$1
ctrl=0
+ if [ ! -f ${file} ]; then
+ return;
+ fi
echo -en "\t- Cleaning msec appended line in ${file} : "
mv -f ${file} /tmp/secure.tmp
touch ${file}
- IFS="
-"
while read line; do
if [ ${ctrl} == 1 ]; then
ctrl=0
@@ -66,7 +67,6 @@ CleanRules() {
echo "${line}" >> ${file}
fi
done < /tmp/secure.tmp
- IFS=" "
rm -f /tmp/secure.tmp
@@ -76,6 +76,10 @@ CleanRules() {
CommentUserRules() {
file=$1
+ if [ ! -f ${file} ]; then
+ return;
+ fi
+
echo -en "\t- Cleaning user appended line in ${file} : "
mv -f ${file} /tmp/secure.tmp
@@ -184,11 +188,15 @@ usermod -G xgrp xfs
# so we delete ( temporarily ) audio user.
if [ ! -f /tmp/secure.DrakX ]; then
- for user in ${DRAKX_USERS}; do
- /etc/security/msec/init-sh/grpuser --del audio "${user}"; then
- done
+ if [ ! -z ${DRAKX_USERS} ]; then
+ for user in ${DRAKX_USERS}; do
+ /etc/security/msec/init-sh/grpuser --del audio "${user}"
+ done
+ fi
else
+ if [ ! -z ${DRAKX_USERS} ]; then
AddRules "${DRAKX_USERS}" /etc/security/msec/security.conf
+ fi
fi