[Pkg-sysvinit-commits] r710 - in sysvinit/trunk/debian: .
initscripts/etc/init.d
Thomas Hood
jdthood-guest at costa.debian.org
Fri Jan 27 16:23:56 UTC 2006
Author: jdthood-guest
Date: 2006-01-27 16:23:54 +0000 (Fri, 27 Jan 2006)
New Revision: 710
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
Log:
Don't run swapon in checkroot.sh if swap is on a lv device or on a swapfile
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2006-01-27 16:05:18 UTC (rev 709)
+++ sysvinit/trunk/debian/changelog 2006-01-27 16:23:54 UTC (rev 710)
@@ -1,8 +1,6 @@
sysvinit (2.86.ds1-12~5) unstable; urgency=low
[ Thomas Hood ]
- * rcS(5): Improve; mention that if UTC=no then admin must ensure
- that zoneinfo is available
* bootlogd: 51_bootlogd_syncalot: Don't sync after each line unless
the (new) -s option is given
(Closes: #205724)
@@ -17,6 +15,10 @@
(Closes: #58119)
* init: 41_selinux_console.dpatch: print to same console as others do
(Closes: #349149)
+ * checkroot.sh: Don't try to enable swap if a swap device is
+ /dev/mapper/* or a swapfile (Closes: #346329, #348534)
+ * rcS(5): Improve; mention that if UTC=no then admin must ensure
+ that zoneinfo is available
* initscripts postinst: Actually remove some things on purge
[ A Costa / TH ]
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh 2006-01-27 16:05:18 UTC (rev 709)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/checkroot.sh 2006-01-27 16:23:54 UTC (rev 710)
@@ -27,7 +27,6 @@
[ "$SULOGIN" = yes ] && sulogin -t 30 $CONSOLE
KERNEL="$(uname -s)"
- RELEASE="$(uname -r)"
MACHINE="$(uname -m)"
#
@@ -47,7 +46,8 @@
rootopts=defaults
rootmode=rw
rootcheck=no
- swap_on_md=no
+ swap_on_lv=no
+ swap_on_file=no
devfs=
while read DEV MTPT FSTYPE OPTS DUMP PASS JUNK
@@ -56,9 +56,8 @@
""|\#*)
continue;
;;
- /dev/md*)
- # Swap on md device.
- [ "$FSTYPE" = "swap" ] && swap_on_md=yes
+ /dev/mapper/*)
+ [ "$FSTYPE" = "swap" ] && swap_on_lv=yes
;;
/dev/*)
;;
@@ -68,14 +67,15 @@
DEV="$(findfs "$DEV")"
fi
;;
+ /*)
+ [ "$FSTYPE" = "swap" ] && swap_on_file=yes
+ ;;
*)
# Devfs definition ?
if [ "$FSTYPE" = "devfs" ] && [ "$MTPT" = "/dev" ] && mountpoint -q /dev
then
devfs="-t $FSTYPE $DEV $MTPT"
fi
- # Might be a swapfile.
- [ "$FSTYPE" = "swap" ] && swap_on_md=yes
;;
esac
[ "$MTPT" != "/" ] && continue
@@ -99,11 +99,12 @@
# before fsck, since fsck can be quite memory-hungry.
#
ENABLE_SWAP=no
- case "${KERNEL}:${RELEASE}" in
- Linux:2.[0123].*)
- if [ "$swap_on_md" = yes ] && grep -qs resync /proc/mdstat
- then
- [ "$VERBOSE" = no ] || log_warning_msg "Not activating swap because RAID array is resyncing."
+ case "$KERNEL" in
+ Linux)
+ if [ "$swap_on_lv" = yes ]
+ [ "$VERBOSE" = no ] || log_warning_msg "Not activating swap on logical volume."
+ elif [ "$swap_on_file" = yes ]
+ [ "$VERBOSE" = no ] || log_warning_msg "Not activating swap on swapfile."
else
ENABLE_SWAP=yes
fi
More information about the Pkg-sysvinit-commits
mailing list