iankelling.org
/
git
/
automated-distro-installer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge fai-kexec info live-kexec
[automated-distro-installer]
/
lk
diff --git
a/lk
b/lk
old mode 100644
(file)
new mode 100755
(executable)
index
7715fda
..
03b17c6
--- a/
lk
+++ b/
lk
@@
-17,9
+17,14
@@
usage() {
cat <<EOF
usage() {
cat <<EOF
-Usage: ${0##*/} [-h|--help]
+Usage: ${0##*/} [-h|--help]
[HOST]
fai kexec from upstream live cds, i.e. curl|bash
fai kexec from upstream live cds, i.e. curl|bash
+If HOST argument, ssh to root@HOST before doing kexec. This does what
+pxe would do, but skipping boot sequence up to and including the pxe
+dhcp.
+
+
You can copy this to a http server, then wget -O- url|sudo bash
curl is sometimes not preinstalled on a live cd.
You can copy this to a http server, then wget -O- url|sudo bash
curl is sometimes not preinstalled on a live cd.
@@
-41,8
+46,13
@@
EOF
}
case $1 in
-h|--help) usage ;;
}
case $1 in
-h|--help) usage ;;
+ ?*) host=$1
esac
esac
+if [[ $host ]]; then
+ ssh root@$host bash -s < $(readlink -f "$BASH_SOURCE")
+ exit $?
+ fi
set -ex
if grep -q ID=ubuntu /etc/os-release; then
set -ex
if grep -q ID=ubuntu /etc/os-release; then