aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPreston Brown <pbrown@redhat.com>2001-07-20 16:13:16 +0000
committerPreston Brown <pbrown@redhat.com>2001-07-20 16:13:16 +0000
commit3bbd6aa663abde92998cfccadca05a684bbd1aed (patch)
tree13991247d88d8ca2bbe0812bcbb58c545838df08
parent579b9b101037b957985825707fbc25fe6d1768b5 (diff)
downloadinitscripts-3bbd6aa663abde92998cfccadca05a684bbd1aed.tar
initscripts-3bbd6aa663abde92998cfccadca05a684bbd1aed.tar.gz
initscripts-3bbd6aa663abde92998cfccadca05a684bbd1aed.tar.bz2
initscripts-3bbd6aa663abde92998cfccadca05a684bbd1aed.tar.xz
initscripts-3bbd6aa663abde92998cfccadca05a684bbd1aed.zip
updates for quota support.
-rw-r--r--initscripts.spec9
-rwxr-xr-xrc.d/rc.sysinit50
2 files changed, 37 insertions, 22 deletions
diff --git a/initscripts.spec b/initscripts.spec
index 8564d310..97360f06 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -1,6 +1,6 @@
Summary: The inittab file and the /etc/init.d scripts.
Name: initscripts
-Version: 6.05
+Version: 6.06
License: GPL
Group: System Environment/Base
Release: 1
@@ -9,10 +9,10 @@ Patch0: initscripts-s390.patch
BuildRoot: /%{_tmppath}/%{name}-%{version}-%{release}-root
Requires: mingetty, /bin/awk, /bin/sed, mktemp, e2fsprogs >= 1.15
Requires: procps >= 2.0.7-7, sysklogd >= 1.3.31
-Requires: setup >= 2.0.3, /sbin/fuser, which
+Requires: setup >= 2.0.3, /sbin/fuser, which, /bin/grep
Requires: modutils >= 2.3.11-5
Requires: util-linux >= 2.10s-11, mount >= 2.11g-4
-Requires: bash >= 2.0
+Requires: bash >= 2.0
Requires: /sbin/ip, /sbin/arping
Conflicts: kernel <= 2.2, timeconfig < 3.0, pppd < 2.3.9, wvdial < 1.40-3
Conflicts: ypbind < 1.6-12
@@ -238,6 +238,9 @@ rm -rf $RPM_BUILD_ROOT
%dir /etc/locale/*/LC_MESSAGES
%changelog
+* Fri Jul 20 2001 Preston Brown <pbrown@redhat.com> 6.06
+- updates for quota
+
* Tue Jul 17 2001 Bill Nottingham <notting@redhat.com>
- own some more directories
- use -O nonetdev, require mount package that understands this
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 64cb7911..4cd75e86 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -254,7 +254,28 @@ if [ -z "$fastboot" -a "$ROOTFSTYPE" != "nfs" ]; then
fi
fi
-# check for arguments
+# Possibly update quotas if fsck was run on /.
+grep -E '[[:space:]]+/[[:space:]]+' /etc/fstab | \
+ awk '{ print $4 }' | \
+ grep -q quota
+_ROOT_HAS_QUOTA=$?
+if [ X"$_RUN_QUOTACHECK" = X1 -a \
+ "$_ROOT_HAS_QUOTA" -a \
+ -x /sbin/quotacheck ]; then
+ if [ -x /sbin/convertquota ]; then
+ if [ -f /quota.user ]; then
+ action $"Converting old user quota files: " \
+ /sbin/convertquota -u / && rm -f /quota.user
+ fi
+ if [ -f /quota.group ]; then
+ action $"Converting old group quota files: " \
+ /sbin/convertquota -g / && rm -f /quota.group
+ fi
+ fi
+ action $"Checking root filesystem quotas: " /sbin/quotacheck -n /
+fi
+
+# check for arguments passed from kernel
if grep -iq nopnp /proc/cmdline >/dev/null 2>&1 ; then
PNP=
@@ -278,7 +299,7 @@ state=`awk '/(^\/dev\/root| \/ )/ { print $4 }' /proc/mounts`
# LVM initialization
if [ -e /proc/lvm -a -x /sbin/vgchange -a -f /etc/lvmtab ]; then
- action $"Setting up LVM:" /sbin/vgscan && /sbin/vgchange -a y
+ action $"Setting up Logical Volume Management:" /sbin/vgscan && /sbin/vgchange -a y
fi
# Clear mtab
@@ -339,18 +360,6 @@ if [ -x /sbin/hdparm ]; then
done
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
# The root filesystem is now read-write, so we can now log via syslog() directly..
if [ -n "$IN_INITLOG" ]; then
@@ -533,21 +542,28 @@ fi
# filesystems are NOT unmounted in single user mode.
action $"Mounting local filesystems: " mount -a -t nonfs,smbfs,ncpfs -O nonetdev
+# check remaining quotas other than root
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
+ action $"Converting old user quota files: " \
/sbin/convertquota -u $mountpt && \
rm -f $mountpt/quota.user
fi
if [ -f "$mountpt/quota.group" ]; then
+ action $"Converting old group quota files: " \
/sbin/convertquota -g $mountpt && \
rm -f $mountpt/quota.group
fi
done
fi
- action $"Checking filesystem quotas: " /sbin/quotacheck -v -R -a
+ action $"Checking local filesystem quotas: " /sbin/quotacheck -aR
+fi
+
+if [ -x /sbin/quotaon ]; then
+ action $"Enabling local filesystem quotas: " /sbin/quotaon -a
fi
# Turn on process accounting
@@ -584,10 +600,6 @@ if [ -f /.unconfigured ]; then
rm -f /.unconfigured
fi
-if [ -x /sbin/quotaon ]; then
- action $"Turning on user and group quotas for local filesystems: " /sbin/quotaon -a
-fi
-
# Clean out /etc.
rm -f /fastboot /fsckoptions /forcefsck /halt /poweroff