From d411f9d414b028f4de7bc45a8f10d7c6152c0c8b Mon Sep 17 00:00:00 2001 From: James Swineson Date: Fri, 20 Mar 2020 23:01:39 +0800 Subject: [PATCH] fix /tmp/menhera.sh: line 178: /usr/bin/mount: No such file or directory --- menhera.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/menhera.sh b/menhera.sh index 1010187..c5e19a8 100755 --- a/menhera.sh +++ b/menhera.sh @@ -175,7 +175,11 @@ menhera::swap_root() { NEWROOT="/" # move mounts - for i in dev proc sys run; do mount --move "${OLDROOT}/$i" "${NEWROOT}/$i"; done + for i in dev proc sys run; do + if [ -d "${OLDROOT}/$i" ]; then + mount --move "${OLDROOT}/$i" "${NEWROOT}/$i" + fi + done mount -t tmpfs -o size=100% tmpfs "${NEWROOT}/tmp" mkdir -p "${WORKDIR}"