Fixes for lxd snap daemon
This commit is contained in:
parent
926da85c67
commit
8a1ecbf5cd
1 changed files with 6 additions and 6 deletions
12
setup-usl-mm
12
setup-usl-mm
|
@ -50,9 +50,8 @@ zfs create crypt/lxd/dir
|
||||||
zfs create crypt/lxd/storage
|
zfs create crypt/lxd/storage
|
||||||
|
|
||||||
echo "Stopping and disabling lxd"
|
echo "Stopping and disabling lxd"
|
||||||
systemctl disable snap.lxd.daemon
|
snap stop lxd.daemon
|
||||||
systemctl disable snap.lxd.daemon.unix.socket
|
snap stop --disable lxd.daemon
|
||||||
systemctl stop snap.lxd.daemon
|
|
||||||
|
|
||||||
echo "Deleting everything in /var/snap/lxd/common/lxd/*"
|
echo "Deleting everything in /var/snap/lxd/common/lxd/*"
|
||||||
rm /var/snap/lxd/common/lxd/* -r
|
rm /var/snap/lxd/common/lxd/* -r
|
||||||
|
@ -116,13 +115,13 @@ echo "echo \"Passwords not match!\"" >> /root/onstart
|
||||||
echo "exit 1" >> /root/onstart
|
echo "exit 1" >> /root/onstart
|
||||||
echo "fi" >> /root/onstart
|
echo "fi" >> /root/onstart
|
||||||
echo "echo \"Stopping LXD snap daemon and deleting /var/snap/lxd/common/lxd/*\"" >> /root/onstart
|
echo "echo \"Stopping LXD snap daemon and deleting /var/snap/lxd/common/lxd/*\"" >> /root/onstart
|
||||||
echo "systemctl stop snap.lxd.daemon" >> /root/onstart
|
echo "snap stop lxd.daemon" >> /root/onstart
|
||||||
echo "rm /var/snap/lxd/common/lxd/* -rf" >> /root/onstart
|
echo "rm /var/snap/lxd/common/lxd/* -rf" >> /root/onstart
|
||||||
echo "echo \"Opening encrypted partition\"" >> /root/onstart
|
echo "echo \"Opening encrypted partition\"" >> /root/onstart
|
||||||
echo "echo \$pass_var | cryptsetup open $PARTITION crypt -c -" >> /root/onstart
|
echo "echo \$pass_var | cryptsetup open $PARTITION crypt -c -" >> /root/onstart
|
||||||
echo "partprobe" >> /root/onstart
|
echo "partprobe" >> /root/onstart
|
||||||
echo "zpool import -d /dev/mapper crypt -f -m" >> /root/onstart
|
echo "zpool import -d /dev/mapper crypt -f -m" >> /root/onstart
|
||||||
echo "systemctl start snap.lxd.daemon" >> /root/onstart
|
echo "snap start lxd.daemon" >> /root/onstart
|
||||||
|
|
||||||
chmod +x /root/onstart
|
chmod +x /root/onstart
|
||||||
read -p "Press any key for reboot"
|
read -p "Press any key for reboot"
|
||||||
|
@ -131,7 +130,8 @@ reboot
|
||||||
|
|
||||||
post_reboot_script () {
|
post_reboot_script () {
|
||||||
echo "Stopping lxd and delete /var/snap/lxd/common/lxd/*"
|
echo "Stopping lxd and delete /var/snap/lxd/common/lxd/*"
|
||||||
systemctl stop snap.lxd.daemon
|
snap stop lxd.daemon
|
||||||
|
snap stop --disable lxd.daemon
|
||||||
rm /var/snap/lxd/common/lxd/* -r
|
rm /var/snap/lxd/common/lxd/* -r
|
||||||
|
|
||||||
echo "Executing /root/onstart"
|
echo "Executing /root/onstart"
|
||||||
|
|
Loading…
Reference in a new issue