diff options
author | Preston Brown <pbrown@redhat.com> | 2001-03-10 22:50:53 +0000 |
---|---|---|
committer | Preston Brown <pbrown@redhat.com> | 2001-03-10 22:50:53 +0000 |
commit | 0abc24ab8a6692ea7f2ab7bcf9cf088d685ede8d (patch) | |
tree | 33d164d2b4b08b731c15eef6e16ec5096ce3338d /rc.d | |
parent | 9ccd339ac9079d30b3c58e8e5b1ff8b85e7808df (diff) | |
download | initscripts-0abc24ab8a6692ea7f2ab7bcf9cf088d685ede8d.tar initscripts-0abc24ab8a6692ea7f2ab7bcf9cf088d685ede8d.tar.gz initscripts-0abc24ab8a6692ea7f2ab7bcf9cf088d685ede8d.tar.bz2 initscripts-0abc24ab8a6692ea7f2ab7bcf9cf088d685ede8d.tar.xz initscripts-0abc24ab8a6692ea7f2ab7bcf9cf088d685ede8d.zip |
work properly with new quota utilities; convert old quota format if possible.
Diffstat (limited to 'rc.d')
-rwxr-xr-x | rc.d/rc.sysinit | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 8b27bcdc..ced6d325 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -331,6 +331,14 @@ fi # Update quotas if fsck was run on /. if [ X"$_RUN_QUOTACHECK" = X1 -a -x /sbin/quotacheck ]; then + if [ -x /sbin/convertquota ]; then + if [ -f /quota.user ]; then + /sbin/convertquota -u / && rm -f /quota.user + fi + if [ -f /quota.group ]; then + /sbin/convertquota -g / && rm -f /quota.group + fi + fi action $"Checking root filesystem quotas: " /sbin/quotacheck -v / fi @@ -512,6 +520,18 @@ fi action $"Mounting local filesystems: " mount -a -t nonfs,smbfs,ncpfs if [ X"$_RUN_QUOTACHECK" = X1 -a -x /sbin/quotacheck ]; then + if [ -x /sbin/convertquota ]; then + # try to convert old quotas + for mountpt in `cat /etc/mtab | awk '$4 ~ /quota/{print $2}'`; do + if [ -f "$mountpt/quota.user" ]; then + /sbin/convertquota -u $mountpt && \ + rm -f $mountpt/quota.user + fi + if [ -f "$mountpt/quota.group" ]; then + /sbin/convertquota -g $mountpt && \ + rm -f $mountpt/quota.group + fi + done action $"Checking filesystem quotas: " /sbin/quotacheck -v -R -a fi |