fixed bind-dirs legacy import function

https://phabricator.whonix.org/T501
This commit is contained in:
Patrick Schleizer 2016-04-29 23:44:18 +02:00
parent 4d015432ce
commit d14203f1ac
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -44,15 +44,20 @@ init() {
[ -n "$rw_dest_dir" ] || rw_dest_dir="/rw/bind-dirs"
[ -n "$symlink_level_max" ] || symlink_level_max="10"
mkdir --parents "$rw_dest_dir"
shopt -s nullglob
shopt -s dotglob
}
legacy() {
if [ -d /rw/srv/qubes-whonix ]; then
mv /rw/srv/qubes-whonix /rw/bind-dirs || true
fi
if [ -d /rw/srv/whonix ]; then
mv /rw/srv/whonix /rw/bind-dirs || true
fi
local item
for item in /rw/srv/qubes-whonix/* /rw/srv/whonix/*; do
mv "$item" /rw/bind-dirs/ || true
done
for item in /rw/srv/qubes-whonix /rw/srv/whonix; do
if [ -d "$item" ]; then
rmdir "$item" || true
fi
done
}
bind_dirs() {