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:

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