Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
weizhouapache committed Sep 3, 2024
1 parent 68f4f77 commit 1f1c819
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions systemvm/debian/opt/cloud/bin/setup/sharedfsvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ setup_sharedfsvm() {
sed -i 's/3922/22/g' /etc/ssh/sshd_config
systemctl restart ssh

sed -i '/- ssh$/s/- ssh/- [ssh, always]/' /etc/cloud/cloud.cfg

# Prevent root login
> /root/.ssh/authorized_keys
> /home/debian/.ssh/authorized_keys

swapoff -a
sudo sed -i '/ swap / s/^/#/' /etc/fstab
log_it "Swap disabled"
Expand All @@ -54,6 +54,7 @@ setup_sharedfsvm() {

log_it "Starting cloud-init services"
if [ -f /home/cloud/success ]; then
cloud-init clean
cloud-init init
systemctl stop cloud-init cloud-config cloud-final
systemctl disable cloud-init cloud-config cloud-final
Expand Down

0 comments on commit 1f1c819

Please sign in to comment.