restart ssh daemon immediately after swapping rootfs

This commit is contained in:
James Swineson 2019-04-09 16:28:57 +08:00
parent ce131b77ec
commit 9c1c25e4c9

View file

@ -102,12 +102,12 @@ swap_root() {
# move mounts
for i in dev proc sys run; do mount --move "${OLDROOT}/$i" "${NEWROOT}/$i"; done
mount -t tmpfs tmpfs "${NEWROOT}/tmp"
echo "Restarting SSH daemon..."
systemctl restart ssh
}
clear_processes() {
echo "Restarting SSH daemon..."
systemctl restart ssh
echo "Disabling swap..."
swapoff -a