diff options
author | freaj <freaj@riseup.net> | 2015-03-23 11:34:25 +0100 |
---|---|---|
committer | freaj <freaj@riseup.net> | 2015-03-23 11:34:25 +0100 |
commit | f8e4235893b9122cffa0400654a2a9b1d1146a11 (patch) | |
tree | 8315e075d548f01a229471f6dcaa1ff55f96c024 /pcr/openrc-core/aufs-unmount.patch | |
parent | 0161d0dd7de853da1f86bb3b6f27adf25977c785 (diff) | |
download | abslibre-f8e4235893b9122cffa0400654a2a9b1d1146a11.tar.gz abslibre-f8e4235893b9122cffa0400654a2a9b1d1146a11.tar.bz2 abslibre-f8e4235893b9122cffa0400654a2a9b1d1146a11.zip |
openrc-core: add new package to [pcr]
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 + |