Package: tiger
Version: 1:3.2.1-35
Severity: normal
Umask check fails due to empty shell variable.
Without analysing it in detail, let me bet that replacing
[ $UMASK1 != 002 -a $UMASK1 != 022 -o $UMASK2 != 002 -a $UMASK2 != 022 ]
with
[ "$UMASK1" != 002 -a "$UMASK1" != 022 -o "$UMASK2" != 002 -a "$UMASK2" != 022 ]
would do...
The problem happens when my /etc/profile contains
# default umask
umask 022
After I removed the first from the lines above, the problem
disappeared. But this is of course naive workaround.
Details below
*** Shortest story ***
/usr/lib/tiger/systems/Linux/2/check_rcumask: line 132: [: too many arguments
*** A bit longer story ***
# /usr/lib/tiger/systems/Linux/2/check_rcumask
Configuring...
Will try to check using config for 'GNU/Linux' running Linux
2.6.16.29-xenU-xp061122...
--CONFIG-- [con005c] Using configuration files for Linux
2.6.16.29-xenU-xp061122. Using
configuration files for generic Linux 2.
# Checking for correct umask settings for init scripts...
--WARN-- [misc021w] There are no umask entries in /etc/init.d/rcS
--WARN-- [misc021w] There are no umask entries in /etc/csh.login
/usr/lib/tiger/systems/Linux/2/check_rcumask: line 132: [: too many arguments
*** Very long story ***
# set -x
mekk:/bin/pwd# . /usr/lib/tiger/systems/Linux/2/check_rcumask
+ . /usr/lib/tiger/systems/Linux/2/check_rcumask
++ TigerInstallDir=/usr/lib/tiger
++ basedir=/usr/lib/tiger
++ for parm in '"$@"'
++ case $parm in
++ for parm in '"$@"'
++ case $parm in
++ for parm in '"$@"'
++ case $parm in
++ for parm in '"$@"'
++ case $parm in
++ '[' '!' -r /usr/lib/tiger/config ']'
++ . /usr/lib/tiger/config
+++ TigerLogDir=/var/log/tiger
+++ TigerWorkDir=/var/run/tiger/work
+++ TigerConfigDir=/etc/tiger
+++ LANG=C
+++ LC_ALL=C
+++ export LANG LC_ALL
+++ '[' YES '!=' YES ']'
++ . /usr/lib/tiger/initdefs
+++ '[' '!' -n echo ']'
+++ trap cleanup 0
++ '[' N = Y ']'
++ echo
++ echo '# Checking for correct umask settings for init scripts...'
# Checking for correct umask settings for init scripts...
++ haveallcmds HEAD TAIL GREP EXPAND SED CAT SORT LS AWK
++ __retval=0
++ for __file in '"$@"'
++ eval '__cmdstr=$HEAD'
+++ __cmdstr=/usr/bin/head
++ set X /usr/bin/head
++ __cmd=/usr/bin/head
++ '[' '!' -n /usr/bin/head ']'
++ '[' '!' -f /usr/bin/head ']'
++ for __file in '"$@"'
++ eval '__cmdstr=$TAIL'
+++ __cmdstr=/usr/bin/tail
++ set X /usr/bin/tail
++ __cmd=/usr/bin/tail
++ '[' '!' -n /usr/bin/tail ']'
++ '[' '!' -f /usr/bin/tail ']'
++ for __file in '"$@"'
++ eval '__cmdstr=$GREP'
+++ __cmdstr=/bin/grep
++ set X /bin/grep
++ __cmd=/bin/grep
++ '[' '!' -n /bin/grep ']'
++ '[' '!' -f /bin/grep ']'
++ for __file in '"$@"'
++ eval '__cmdstr=$EXPAND'
+++ __cmdstr=/usr/bin/expand
++ set X /usr/bin/expand
++ __cmd=/usr/bin/expand
++ '[' '!' -n /usr/bin/expand ']'
++ '[' '!' -f /usr/bin/expand ']'
++ for __file in '"$@"'
++ eval '__cmdstr=$SED'
+++ __cmdstr=/bin/sed
++ set X /bin/sed
++ __cmd=/bin/sed
++ '[' '!' -n /bin/sed ']'
++ '[' '!' -f /bin/sed ']'
++ for __file in '"$@"'
++ eval '__cmdstr=$CAT'
+++ __cmdstr=/bin/cat
++ set X /bin/cat
++ __cmd=/bin/cat
++ '[' '!' -n /bin/cat ']'
++ '[' '!' -f /bin/cat ']'
++ for __file in '"$@"'
++ eval '__cmdstr=$SORT'
+++ __cmdstr=/usr/bin/sort
++ set X /usr/bin/sort
++ __cmd=/usr/bin/sort
++ '[' '!' -n /usr/bin/sort ']'
++ '[' '!' -f /usr/bin/sort ']'
++ for __file in '"$@"'
++ eval '__cmdstr=$LS'
+++ __cmdstr=/bin/ls
++ set X /bin/ls
++ __cmd=/bin/ls
++ '[' '!' -n /bin/ls ']'
++ '[' '!' -f /bin/ls ']'
++ for __file in '"$@"'
++ eval '__cmdstr=$AWK'
+++ __cmdstr=/usr/bin/awk
++ set X /usr/bin/awk
++ __cmd=/usr/bin/awk
++ '[' '!' -n /usr/bin/awk ']'
++ '[' '!' -f /usr/bin/awk ']'
++ return 0
++ Foundumask=0
++ for file in ''\''/etc/init.d/rcS'\''' ''\''/etc/rc.d/init.d/umask.sh'\'''
''\''/etc/init.d/umask.sh'\''' ''\''/etc/rc.d/init.d/functions'\'''
''\''/etc/csh.login'\''' ''\''/etc/profile'\'''
++ '[' -r /etc/init.d/rcS ']'
+++ /usr/bin/wc -l
+++ /bin/grep umask /etc/init.d/rcS
++ Occurance=0
++ '[' 0 -eq 1 ']'
++ '[' 0 = 2 ']'
++ '[' 0 = 0 ']'
++ message WARN misc021w '' 'There are no umask entries in /etc/init.d/rcS'
++ _level=WARN
++ _msgid=misc021w
++ _trail=
++ _mesg='There are no umask entries in /etc/init.d/rcS'
++ __len=79
++ ignore_message 'WARN misc021w There are no umask entries in /etc/init.d/rcS'
++ __retval=1
++ __mesgcheck='WARN misc021w There are no umask entries in /etc/init.d/rcS'
++ '[' -n /etc/tiger/tiger.ignore ']'
++ '[' -f /etc/tiger/tiger.ignore ']'
+++ /bin/egrep -v -f /etc/tiger/tiger.ignore
+++ echo 'WARN misc021w There are no umask entries in /etc/init.d/rcS'
++ '[' -z 'WARN misc021w There are no umask entries in /etc/init.d/rcS' ']'
++ return 1
++ '[' N = N ']'
++ '[' WARN = INFO -a xN = xN ']'
++ /usr/bin/awk '
BEGIN {
printf("--%s-- [%s] ", "WARN", "misc021w");
vl = length("WARN") + 5;
spaces="";
for(i=0;i<vl;i++)
spaces=spaces " ";
ll = vl + length("misc021w") + 3;
}
{
if(ll==0){
printf("%s", spaces);
ll=vl;
}
for(i=1;i<=NF;i++){
wl = length($i)+1;
if(79 != 0 && (wl + ll) > 79){
printf("\n%s", spaces);
ll = vl;
}
printf("%s ", $i);
ll += wl;
}
printf("\n");
ll=0;
}
'
--WARN-- [misc021w] ++ echo 'There are no umask entries in /etc/init.d/rcS'
++ '[' -n '' ']'
There are no umask entries in /etc/init.d/rcS
++ '[' N = Y ']'
++ for file in ''\''/etc/init.d/rcS'\''' ''\''/etc/rc.d/init.d/umask.sh'\'''
''\''/etc/init.d/umask.sh'\''' ''\''/etc/rc.d/init.d/functions'\'''
''\''/etc/csh.login'\''' ''\''/etc/profile'\'''
++ '[' -r /etc/rc.d/init.d/umask.sh ']'
++ for file in ''\''/etc/init.d/rcS'\''' ''\''/etc/rc.d/init.d/umask.sh'\'''
''\''/etc/init.d/umask.sh'\''' ''\''/etc/rc.d/init.d/functions'\'''
''\''/etc/csh.login'\''' ''\''/etc/profile'\'''
++ '[' -r /etc/init.d/umask.sh ']'
++ for file in ''\''/etc/init.d/rcS'\''' ''\''/etc/rc.d/init.d/umask.sh'\'''
''\''/etc/init.d/umask.sh'\''' ''\''/etc/rc.d/init.d/functions'\'''
''\''/etc/csh.login'\''' ''\''/etc/profile'\'''
++ '[' -r /etc/rc.d/init.d/functions ']'
++ for file in ''\''/etc/init.d/rcS'\''' ''\''/etc/rc.d/init.d/umask.sh'\'''
''\''/etc/init.d/umask.sh'\''' ''\''/etc/rc.d/init.d/functions'\'''
''\''/etc/csh.login'\''' ''\''/etc/profile'\'''
++ '[' -r /etc/csh.login ']'
+++ /usr/bin/wc -l
+++ /bin/grep umask /etc/csh.login
++ Occurance=0
++ '[' 0 -eq 1 ']'
++ '[' 0 = 2 ']'
++ '[' 0 = 0 ']'
++ message WARN misc021w '' 'There are no umask entries in /etc/csh.login'
++ _level=WARN
++ _msgid=misc021w
++ _trail=
++ _mesg='There are no umask entries in /etc/csh.login'
++ __len=79
++ ignore_message 'WARN misc021w There are no umask entries in /etc/csh.login'
++ __retval=1
++ __mesgcheck='WARN misc021w There are no umask entries in /etc/csh.login'
++ '[' -n /etc/tiger/tiger.ignore ']'
++ '[' -f /etc/tiger/tiger.ignore ']'
+++ /bin/egrep -v -f /etc/tiger/tiger.ignore
+++ echo 'WARN misc021w There are no umask entries in /etc/csh.login'
++ '[' -z 'WARN misc021w There are no umask entries in /etc/csh.login' ']'
++ return 1
++ '[' N = N ']'
++ '[' WARN = INFO -a xN = xN ']'
++ /usr/bin/awk '
BEGIN {
printf("--%s-- [%s] ", "WARN", "misc021w");
vl = length("WARN") + 5;
spaces="";
for(i=0;i<vl;i++)
spaces=spaces " ";
ll = vl + length("misc021w") + 3;
}
{
if(ll==0){
printf("%s", spaces);
ll=vl;
}
for(i=1;i<=NF;i++){
wl = length($i)+1;
if(79 != 0 && (wl + ll) > 79){
printf("\n%s", spaces);
ll = vl;
}
printf("%s ", $i);
ll += wl;
}
printf("\n");
ll=0;
}
'
--WARN-- [misc021w] ++ echo 'There are no umask entries in /etc/csh.login'
++ '[' -n '' ']'
There are no umask entries in /etc/csh.login
++ '[' N = Y ']'
++ for file in ''\''/etc/init.d/rcS'\''' ''\''/etc/rc.d/init.d/umask.sh'\'''
''\''/etc/init.d/umask.sh'\''' ''\''/etc/rc.d/init.d/functions'\'''
''\''/etc/csh.login'\''' ''\''/etc/profile'\'''
++ '[' -r /etc/profile ']'
+++ /usr/bin/wc -l
+++ /bin/grep umask /etc/profile
++ Occurance=2
++ '[' 2 -eq 1 ']'
++ '[' 2 = 2 ']'
++ Foundumask=1
+++ /usr/bin/expand
+++ /usr/bin/head -n 1
+++ /bin/sed -e 's/^.*umask//'
+++ /usr/bin/cut '-d ' -f2
+++ /bin/grep umask /etc/profile
++ UMASK1=
+++ /usr/bin/expand
+++ /usr/bin/tail -n 1
+++ /bin/sed -e 's/^.*umask//'
+++ /usr/bin/cut '-d ' -f2
+++ /bin/grep umask /etc/profile
++ UMASK2=022
++ '[' '!=' 002 -a '!=' 022 -o 022 '!=' 002 -a 022 '!=' 022 ']'
-bash: [: too many arguments
++ '[' 1 -eq 0 ']'
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]