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

Update distro.sh

parent be464aa1
......@@ -2,14 +2,14 @@
FILES="authorized_keys ssh_host_key container_token"
check_penguin {
check_penguin{
if [ -z `lxc ls | grep "penguin | RUNNING"` ]; then
echo "Opps. Penguin isn't running. This might be fixable by just running 'lxc start penguin'. If penguin isn't running, then we cannot get the values we need to start an alternate container."
exit 1
fi
}
get_file {
get_file{
check_penguin
# Workaround for the read protected files at rest.
local PATH="/mnt/stateful/lxd/devices/penguin/disk.$1.dev-.$1"
......@@ -21,7 +21,7 @@ get_file {
fi
}
values_penguin {
values_penguin{
check_penguin
for x in ${FILES}; do
# Creates a variable named after an item in $FILES and assigns it the value of the file.
......@@ -29,13 +29,13 @@ values_penguin {
done
}
user_penguin {
user_penguin{
check_penguin
USER=`lxc exec penguin -- ls /home`
echo "${USER[0]}"
}
swap_penguin {
swap_penguin{
values_penguin
lxc stop penguin --force
lxc rename penguin stretch
......
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