diff --git a/home/scripts/lxc/lab-create.sh b/home/scripts/lxc/lab-create.sh index 42047b0..403462f 100644 --- a/home/scripts/lxc/lab-create.sh +++ b/home/scripts/lxc/lab-create.sh @@ -16,7 +16,7 @@ lxc-start -n "$CONTAINER" sleep 5 # set root password, install SSH, inject key -lxc-attach -n "$CONTAINER" -- bash -c " +lxc-attach -n "$CONTAINER" -- /bin/bash -c " apt-get update && apt-get install -y openssh-server mkdir -p /root/.ssh chmod 700 /root/.ssh diff --git a/home/scripts/lxc/lxc-login.sh b/home/scripts/lxc/lxc-login.sh index a12b23f..02a0910 100644 --- a/home/scripts/lxc/lxc-login.sh +++ b/home/scripts/lxc/lxc-login.sh @@ -11,7 +11,7 @@ fi lxc-start -n "$CONTAINER" 2>/dev/null || true if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then - exec lxc-attach -n "$CONTAINER" -- bash -c "$SSH_ORIGINAL_COMMAND" + exec lxc-attach -n "$CONTAINER" -- /bin/bash -c "$SSH_ORIGINAL_COMMAND" else - exec lxc-attach -n "$CONTAINER" -- login -f root + exec lxc-attach -n "$CONTAINER" -- /bin/login -f root fi