bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"test -w aquota.user" gives different exit code after quotaon run


From: Frank Wang
Subject: "test -w aquota.user" gives different exit code after quotaon run
Date: Fri, 19 Aug 2005 17:28:18 +0100 (BST)

Configuration Information [Automatically generated, do
not change]:
Machine: i386
OS: linux-gnu
Compiler: i386-redhat-linux-gcc
Compilation CFLAGS:  -DPROGRAM='bash'
-DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu'
-DCONF_MACHTYPE='i386-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale'
-DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H  -I.  -I.
-I./include -I./lib  -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -g -pipe
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386
-mtune=pentium4 -fasynchronous-unwind-tables
uname output: Linux twinhead.yafrank.homeip.net
2.6.12.3-min3 #1 Sat Aug 6 21:13:43 CST 2005 i686 i686
i386 GNU/Linux
Machine Type: i386-redhat-linux-gnu

Bash Version: 3.0
Patch Level: 16
Release Status: release

Description:
        A user quota management script recently always aborts
in a fc3 server with latest update. Experiment shows
that '[ -w /usr/local/aquota.user ]' returns 1 after
quotaon run triggers the abortion. The same script
used to work fine in early fc3. Enable quota in my fc4
box's /usr/local partition and do following test shows
similar behavior:

[root@twinhead local]# pwd
/usr/local
[root@twinhead local]# quotaoff -aup
user quota on /usr/local (/dev/hda9) is off
[root@twinhead local]# ls -l aquota*
-rw-------  1 root root 11264  8月 18 18:36
aquota.user
[root@twinhead local]# [ -r aquota.user ] && echo true
true
[root@twinhead local]# [ -w aquota.user ] && echo true
true
[root@twinhead local]# quotaon -au
[root@twinhead local]# quotaon -aup
user quota on /usr/local (/dev/hda9) is on
[root@twinhead local]# ls -l aquota*
-rw-------  1 root root 11264  8月 18 18:36
aquota.user
[root@twinhead local]# [ -w aquota.user ] && echo true
[root@twinhead local]# [ -r aquota.user ] && echo true
true

        Why "test -w aquota.user" returns different exit code
after quotaon run while ls shows the same permission?
Do I make anything wrong here?

Repeat-By:
        Turn on and off quota and compare exit code from
"test -w /path/to/mount_point/aquota.user"

Send instant messages to your online friends http://uk.messenger.yahoo.com 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]