aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2012-01-14 02:14:59 +0100
committerTom Gundersen <teg@jklm.no>2012-01-14 02:14:59 +0100
commit5dd3fbaa93c157cfa37351324de06096f4377808 (patch)
tree11be11a90cc545bd94908de6b21818da6f19fdcd
parent748db5c108758fd1c54efb4fc3a2e18345646230 (diff)
downloadinitscripts-5dd3fbaa93c157cfa37351324de06096f4377808.tar.xz
mount: no longer pass '-n' to mount
This was needed when /etc/mtab was a regular file in order to avoid writing to it when /etc/ was mounted ro. However, now it is not needed. Passing -n should have been a noop, except for the NILFS mount helper. It will only start the daemon if the -n flag is not passed. This fixes FS#22523. Tested-by: Alexander Lam <lambchop468@gmail.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
-rw-r--r--functions4
-rwxr-xr-xrc.shutdown2
-rwxr-xr-xrc.sysinit16
3 files changed, 11 insertions, 11 deletions
diff --git a/functions b/functions
index b409055..4c4d614 100644
--- a/functions
+++ b/functions
@@ -455,7 +455,7 @@ fsck_reboot() {
echo "* *"
echo "* Please repair manually and reboot. Note that the root *"
echo "* file system is currently mounted read-only. To remount *"
- echo "* it read-write type: mount -n -o remount,rw / *"
+ echo "* it read-write type: mount -o remount,rw / *"
echo "* When you exit the maintenance shell the system will *"
echo "* reboot automatically. *"
echo "* *"
@@ -465,7 +465,7 @@ fsck_reboot() {
fi
echo "Automatic reboot in progress..."
umount -a
- mount -n -o remount,ro /
+ mount -o remount,ro /
reboot -f
exit 0
}
diff --git a/rc.shutdown b/rc.shutdown
index 4b513f7..54a1e9a 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -123,7 +123,7 @@ if [[ -x /run/initramfs/shutdown ]]; then
else
status "Remounting Root Filesystem Read-only" \
- mount -n -o remount,ro /
+ mount -o remount,ro /
# Power off or reboot
printsep
diff --git a/rc.sysinit b/rc.sysinit
index 3f09bfd..b70ceaa 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -12,22 +12,22 @@ printhl "${C_H2}http://www.archlinux.org"
printsep
# mount /proc, /sys, /run, /dev, /run/lock, /dev/pts, /dev/shm (the api filesystems)
-mountpoint -q /proc || mount -n -t proc proc /proc -o nosuid,noexec,nodev
-mountpoint -q /sys || mount -n -t sysfs sys /sys -o nosuid,noexec,nodev
-mountpoint -q /run || mount -n -t tmpfs run /run -o mode=0755,nosuid,nodev
-mountpoint -q /dev || mount -n -t devtmpfs dev /dev -o mode=0755,nosuid
+mountpoint -q /proc || mount -t proc proc /proc -o nosuid,noexec,nodev
+mountpoint -q /sys || mount -t sysfs sys /sys -o nosuid,noexec,nodev
+mountpoint -q /run || mount -t tmpfs run /run -o mode=0755,nosuid,nodev
+mountpoint -q /dev || mount -t devtmpfs dev /dev -o mode=0755,nosuid
mkdir -p -m 1777 /run/lock
mkdir -p /dev/{pts,shm}
-mountpoint -q /dev/pts || mount -n /dev/pts &>/dev/null ||
+mountpoint -q /dev/pts || mount /dev/pts &>/dev/null ||
mount -n -t devpts devpts /dev/pts -o mode=0620,gid=5,nosuid,noexec
-mountpoint -q /dev/shm || mount -n /dev/shm &>/dev/null ||
+mountpoint -q /dev/shm || mount /dev/shm &>/dev/null ||
mount -n -t tmpfs shm /dev/shm -o mode=1777,nosuid,nodev
if [[ ! -e /run/initramfs/fsck-root ]]; then
# remount root ro to allow for fsck later on, we remount now to
# make sure nothing can open files rw on root which would block a remount
findmnt / --options ro &>/dev/null ||
- status "Mounting Root Read-Only" mount -n -o remount,ro /
+ status "Mounting Root Read-Only" mount -o remount,ro /
fi
run_hook sysinit_start
@@ -190,7 +190,7 @@ run_hook sysinit_postfsck
fsck_reboot $fsckret
status "Remounting Root" \
- mount -n -o remount /
+ mount -o remount /
# now mount all the local filesystems
run_hook sysinit_premount