From 82790858113a103d9cbd19f664f5e1b7ac113d58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 15 Feb 2017 16:03:41 +0100 Subject: [PATCH] Make shellcheck happy + identify the script :) --- takeover.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/takeover.sh b/takeover.sh index 7c04fb2..ca699ed 100755 --- a/takeover.sh +++ b/takeover.sh @@ -1,4 +1,7 @@ #!/bin/sh +# +# https://github.com/marcan/takeover.sh + set -e TO=/takeover @@ -41,7 +44,7 @@ exec <"$TO/$TTY" >"$TO/$TTY" 2>"$TO/$TTY" ./busybox echo "Type 'OK' to continue" ./busybox echo -n "> " -read a +read -r a if [ "$a" != "OK" ] ; then exit 1 fi @@ -58,6 +61,7 @@ cd "${TO}" ./busybox echo "Pivoting root..." ./busybox pivot_root . old_root ./busybox echo "Chrooting and running init..." +# shellcheck disable=SC2094 exec ./busybox chroot . /fakeinit EOF ./busybox chmod +x tmp/init @@ -70,7 +74,7 @@ EOF ./busybox echo "You should SSH into the secondary sshd now." ./busybox echo "Type OK to continue" ./busybox echo -n "> " -read a +read -r a if [ "$a" != "OK" ] ; then exit 1 fi @@ -85,4 +89,3 @@ fi ./tmp/telinit u ./busybox sleep 10 -