aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xalpine-chroot-activate2
-rwxr-xr-xalpine-chroot-create2
-rwxr-xr-xalpine-chroot-deactivate2
-rwxr-xr-xalpine-chroot-delete2
4 files changed, 4 insertions, 4 deletions
diff --git a/alpine-chroot-activate b/alpine-chroot-activate
index fb70a30..31ab90e 100755
--- a/alpine-chroot-activate
+++ b/alpine-chroot-activate
@@ -25,7 +25,7 @@ set -xu
umask 022
-ensure export chroot_dir="$1"
+ensure export chroot_dir="$(ensure realpath -- "$1")"
umount "${chroot_dir}/dev"
umount "${chroot_dir}/proc"
diff --git a/alpine-chroot-create b/alpine-chroot-create
index 34dd13d..7337b50 100755
--- a/alpine-chroot-create
+++ b/alpine-chroot-create
@@ -29,7 +29,7 @@ fi
export alpine_mirror
ensure export arch="$(uname -m)"
export release='edge'
-export chroot_dir="$1"
+ensure export chroot_dir="$(ensure realpath -- "$1")"
ensure export rxrand="$(base64 < /dev/random | tr -d '/+=' | head -c 10)"
diff --git a/alpine-chroot-deactivate b/alpine-chroot-deactivate
index a325399..ce6e6ab 100755
--- a/alpine-chroot-deactivate
+++ b/alpine-chroot-deactivate
@@ -25,7 +25,7 @@ set -xu
umask 022
-ensure export chroot_dir="$1"
+ensure export chroot_dir="$(ensure realpath -- "$1")"
umount "${chroot_dir}/dev"
umount "${chroot_dir}/proc"
diff --git a/alpine-chroot-delete b/alpine-chroot-delete
index e37a076..71af53f 100755
--- a/alpine-chroot-delete
+++ b/alpine-chroot-delete
@@ -25,7 +25,7 @@ set -xu
umask 022
-ensure export chroot_dir="$1"
+ensure export chroot_dir="$(ensure realpath -- "$1")"
if [ "$chroot_dir" = "/" ]
then