Remove free if exists
This commit is contained in:
parent
c14cc7a7a1
commit
23328640e8
|
@ -35,10 +35,12 @@ apt update
|
||||||
apt --assume-yes install -- wget
|
apt --assume-yes install -- wget
|
||||||
|
|
||||||
# Remove last partition with all free space
|
# Remove last partition with all free space
|
||||||
umount /mnt/free
|
if [ -d /mnt/free ]; then
|
||||||
lvremove --force /dev/mapper/vg-free
|
umount /mnt/free
|
||||||
/bin/rmdir -- /mnt/free
|
test -f /dev/mapper/vg-free && lvremove --force /dev/mapper/vg-free
|
||||||
/bin/sed --in-place -- '/\/mnt\/free/d' /etc/fstab
|
/bin/rmdir -- /mnt/free
|
||||||
|
/bin/sed --in-place -- '/\/mnt\/free/d' /etc/fstab
|
||||||
|
fi
|
||||||
|
|
||||||
# Allow root connection with password
|
# Allow root connection with password
|
||||||
/bin/sed --in-place -- 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config
|
/bin/sed --in-place -- 's/\(^\|^\#\)\(PermitRootLogin\).*/\2 yes/g' /etc/ssh/sshd_config
|
||||||
|
|
Loading…
Reference in New Issue