diff options
Diffstat (limited to 'pcr/openrc-core/aufs-unmount.patch')
-rw-r--r-- | pcr/openrc-core/aufs-unmount.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pcr/openrc-core/aufs-unmount.patch b/pcr/openrc-core/aufs-unmount.patch new file mode 100644 index 000000000..76fa5b250 --- /dev/null +++ b/pcr/openrc-core/aufs-unmount.patch @@ -0,0 +1,38 @@ +--- ../init.d/localmount.in.orig 2015-02-18 19:56:50.000000000 +0100 ++++ ../init.d/localmount.in 2015-02-20 01:04:45.783058606 +0100 +@@ -72,19 +72,22 @@ + + local aufs_branch aufs_mount_dir aufs_mount_point aufs_si_dir aufs_si_id + for aufs_si_dir in /sys/fs/aufs/*; do +- aufs_mount_dir=${aufs_si_dir#/sys/fs/aufs/} +- aufs_si_id="$(printf "%s" $aufs_mount_dir | sed 's/_/=/g')" +- aufs_mount_point="$(mountinfo -o ${aufs_si_id})" +- for x in $aufs_si_dir/br[0-9][0-9][0-9]; do +- aufs_branch=$(sed 's/=.*//g' $x) +- eindent +- if ! mount -o "remount,del:$aufs_branch" "$aufs_mount_point" > /dev/null 2>&1; then +- ewarn "Failed to remove branch $aufs_branch from aufs \ +- $aufs_mount_point" +- fi +- eoutdent +- sync +- done ++ if [[ -d ${aufs_si_dir} ]];then ++ aufs_mount_dir=${aufs_si_dir#/sys/fs/aufs/} ++ aufs_si_id="$(printf "%s" $aufs_mount_dir | sed 's/_/=/g')" ++ aufs_mount_point="$(mountinfo -o ${aufs_si_id})" ++ ++ for x in $aufs_si_dir/br[0-9][0-9][0-9]; do ++ aufs_branch=$(sed 's/=.*//g' $x) ++ eindent ++ if ! mount -o "remount,del:$aufs_branch" "$aufs_mount_point" > /dev/null 2>&1; then ++ ewarn "Failed to remove branch $aufs_branch from aufs \ ++ $aufs_mount_point" ++ fi ++ eoutdent ++ sync ++ done ++ fi + done + fi + |