Skip to content

Commit a0e407d

Browse files
authored
fix: regression in disable and stop sshd service (#8596)
1 parent c1eb88c commit a0e407d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

parts/linux/cloud-init/artifacts/cse_helpers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ waitForContainerdReady() {
677677
}
678678

679679
systemctlDisableAndStop() {
680-
if systemctl list-units --full --all | grep -q "$1.service"; then
680+
if systemctl cat "$1" &>/dev/null; then
681681
systemctl_stop 20 5 25 $1 || echo "$1 could not be stopped"
682682
systemctl_disable 20 5 25 $1 || echo "$1 could not be disabled"
683683
fi

0 commit comments

Comments
 (0)