aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt J. Bosch <kjb-temp-2009@alpenjodel.de>2011-06-25 09:33:37 +0200
committerKurt J. Bosch <kjb-temp-2009@alpenjodel.de>2011-06-28 15:39:42 +0200
commite93e5269ebd2e3a82a67cfe1ad517354eb34c41b (patch)
tree8f3bc0070129a3092db20557d5236161e069db7c
parent31c5c35e85c235a388705e08850693fd2bfda979 (diff)
downloadinitscripts-e93e5269ebd2e3a82a67cfe1ad517354eb34c41b.tar.xz
Add some comments
-rw-r--r--functions2
-rwxr-xr-xrc.sysinit3
2 files changed, 5 insertions, 0 deletions
diff --git a/functions b/functions
index 46aebf2..e71ee1f 100644
--- a/functions
+++ b/functions
@@ -372,6 +372,7 @@ read_crypttab() {
NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk,noglusterfs,nodavfs"
+# Check local filesystems
fsck_all() {
stat_busy "Checking Filesystems"
FSCK_OUT=/dev/stdout
@@ -391,6 +392,7 @@ fsck_all() {
return $fsckret
}
+# Single-user login and/or automatic reboot after fsck (if needed)
fsck_reboot() {
# $1 = exit code returned by fsck
# Ignore conditions 'FS errors corrected' and 'Cancelled by the user'
diff --git a/rc.sysinit b/rc.sysinit
index 9f9eb0c..27e603b 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -90,6 +90,7 @@ udevd_modprobe sysinit
[[ $USEBTRFS = [Yy][Ee][Ss] && -x $(type -P btrfs) ]] &&
status "Activating BTRFS volumes" btrfs device scan
+# Activate LVM2 groups if any
activate_vgs
# Set up non-root encrypted partition mappings
@@ -186,7 +187,9 @@ if [[ -f /etc/crypttab && $CS ]] && grep -q ^[^#] /etc/crypttab; then
fi
if [[ -x $(type -P fsck) ]]; then
+ # Check filesystems
fsck_all
+ # Single-user login and/or automatic reboot if needed
fsck_reboot $?
fi