From 245d387c737ba4be367c08c022a39efe513f2059 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 5 Nov 2002 14:20:59 +0000 Subject: add verify-shell --- add-shell | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'add-shell') 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 -- cgit v1.2.1