aboutsummaryrefslogtreecommitdiffstats
path: root/add-shell
diff options
context:
space:
mode:
Diffstat (limited to 'add-shell')
-rwxr-xr-xadd-shell8
1 files changed, 3 insertions, 5 deletions
diff --git a/add-shell b/add-shell
index cd8ecb0..ea60c91 100755
--- a/add-shell
+++ b/add-shell
@@ -7,7 +7,7 @@
# Author : Thierry Vignaud
# Created On : Tue Nov 5 13:52:20 2002
# Purpose : helper script for rpm scriptlets to add a
-# shell from $CFG_FILE.
+# shell from /etc/shells
#---------------------------------------------------------------
if [ $# != 3 ]; then
@@ -26,7 +26,5 @@ if [ ! -f $CFG_FILE ]; then
> $CFG_FILE
fi
-if [ $num = 1 ]; then
- grep -v "^$shl$" && echo $shl >> $CFG_FILE
-fi
-
+grep -qv "^$shl$" $CFG_FILE && echo $shl >> $CFG_FILE
+exit 0 \ No newline at end of file