Commit cb3b02b1 authored by Jonathan Bryant's avatar Jonathan Bryant 💬

Update distro.sh

parent 9a9e1c57
......@@ -11,16 +11,15 @@ check_penguin() {
get_file() {
# All ssh mounts have an added term.
if [ -z "$(echo $x | /bin/grep 'ssh')" ]; then
if [ -z "$(echo $1 | /bin/grep ssh)" ]; then
local PATH="/mnt/stateful/lxd/devices/penguin/disk.$1.dev-.ssh-$1"
else
local PATH="/mnt/stateful/lxd/devices/penguin/disk.$1.dev-.$1"
fi
# Workaround for the read protected files at rest.
if [ -f $PATH ]; then
echo "$(/bin/cat $PATH)"
/bin/cat $PATH
else
echo "Cannot find $1."
exit 1
fi
}
......@@ -42,7 +41,7 @@ swap_penguin() {
local USER="$(user_penguin)"
/usr/bin/lxc stop penguin --force
/usr/bin/lxc rename penguin stretch
/usr/bin/run_container.sh --container_name="penguin" --user="$USER" --image="$1" --lxd_remote="https://images.linuxcontainers.com" --container_token="$container_token" --host_public_key="$ssh_host_key" --guest_private_key="$authorized_keys"
/usr/bin/run_container.sh --container_name="penguin" --user="$USER" --container_image="$1" --lxd_remote="https://images.linuxcontainers.com" --container_token="$container_token" --host_public_key="$ssh_host_key" --guest_private_key="$authorized_keys"
}
check_penguin
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment