aboutsummaryrefslogtreecommitdiffstats
path: root/add-shell
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-11-05 14:20:59 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-11-05 14:20:59 +0000
commit245d387c737ba4be367c08c022a39efe513f2059 (patch)
treef632104981dde3ea6640675129ade6bfb821859a /add-shell
parent79f22f5863191a94c22dccf708f814d09f541540 (diff)
downloadrpm-helper-245d387c737ba4be367c08c022a39efe513f2059.tar
rpm-helper-245d387c737ba4be367c08c022a39efe513f2059.tar.gz
rpm-helper-245d387c737ba4be367c08c022a39efe513f2059.tar.bz2
rpm-helper-245d387c737ba4be367c08c022a39efe513f2059.tar.xz
rpm-helper-245d387c737ba4be367c08c022a39efe513f2059.zip
add verify-shell
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