aboutsummaryrefslogtreecommitdiffstats
path: root/systemd
diff options
context:
space:
mode:
authorNicolas Lécureuil <neoclust@mageia.org>2016-02-12 23:16:46 +0100
committerNicolas Lécureuil <neoclust@mageia.org>2016-02-12 23:16:46 +0100
commit08eee6c0c91bcff0c401a12fd7b640a1831408ba (patch)
tree3290e64fcc06b3298b105b36ed278aa382d6331f /systemd
parentdb9b41d4763cb7cc1fae3d6fbd10825690c079e3 (diff)
parent969a6ee6382d4479482a4aa2066cadbc25593081 (diff)
downloadinitscripts-08eee6c0c91bcff0c401a12fd7b640a1831408ba.tar
initscripts-08eee6c0c91bcff0c401a12fd7b640a1831408ba.tar.gz
initscripts-08eee6c0c91bcff0c401a12fd7b640a1831408ba.tar.bz2
initscripts-08eee6c0c91bcff0c401a12fd7b640a1831408ba.tar.xz
initscripts-08eee6c0c91bcff0c401a12fd7b640a1831408ba.zip
Merge tag 'initscripts-9.64-1' into distro/mga
Tag as initscripts-9.64-1 rc.d/init.d/network: Added ADSL type ( not present in fedora : TOOD: See if this is upstreamable )
Diffstat (limited to 'systemd')
-rwxr-xr-xsystemd/fedora-import-state2
-rwxr-xr-xsystemd/fedora-readonly9
2 files changed, 7 insertions, 4 deletions
diff --git a/systemd/fedora-import-state b/systemd/fedora-import-state
index 7809ca81..07fd5cad 100755
--- a/systemd/fedora-import-state
+++ b/systemd/fedora-import-state
@@ -6,6 +6,6 @@ cd /run/initramfs/state
find . -mindepth 1 -maxdepth 1 -exec cp -av -t / {} \;
# run restorecon on the copied files
-if [ -e /sys/fs/selinux/enforce ]; then
+if [ -e /sys/fs/selinux/enforce -a -x /usr/sbin/restorecon ]; then
find . -mindepth 1 -print0 | { cd / && xargs --null restorecon -i; }
fi
diff --git a/systemd/fedora-readonly b/systemd/fedora-readonly
index f33eef48..50e5ed97 100755
--- a/systemd/fedora-readonly
+++ b/systemd/fedora-readonly
@@ -75,6 +75,9 @@ if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then
# Scan partitions for local scratch storage
rw_mount_dev=$(blkid -t LABEL="$RW_LABEL" -l -o device)
+ bindmountopts=
+ [ "$SLAVE_MOUNTS" = "yes" ] && bindmountopts="--make-slave"
+
# First try to mount scratch storage from /etc/fstab, then any
# partition with the proper label. If either succeeds, be sure
# to wipe the scratch storage clean. If both fail, then mount
@@ -117,7 +120,7 @@ if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then
done
[[ $prefix -eq 1 ]] && continue
- mount -n --bind "$RW_MOUNT$m" "$m"
+ mount -n --bind $bindmountopts "$RW_MOUNT$m" "$m"
selinux_fixup "$m"
done
@@ -165,7 +168,7 @@ if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then
mount_state() {
if [ -e "$1" ]; then
[ ! -e "$STATE_MOUNT$1" ] && cp -a --parents "$1" "$STATE_MOUNT"
- mount -n --bind "$STATE_MOUNT$1" "$1"
+ mount -n --bind $bindmountopts "$STATE_MOUNT$1" "$1"
fi
}
@@ -174,7 +177,7 @@ if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then
[ ! -f "$file" ] && continue
if [ -f "$STATE_MOUNT/$file" ] ; then
- mount -n --bind "$STATE_MOUNT/$file" "$file"
+ mount -n --bind $bindmountopts "$STATE_MOUNT/$file" "$file"
fi
for path in $(grep -v "^#" "$file" 2>/dev/null); do