Skip to content

Commit 8f823df

Browse files
committed
added kill switch via server tag
analog to Arch Linux version
1 parent 2c02970 commit 8f823df

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ubuntukernel-load.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,15 @@ sanity_checks() {
125125
if [ ! -x /run/initramfs/sbin/kexec ] ; then
126126
fatal "current initrd has no kexec binary. kexec will fail."
127127
fi
128+
129+
exit_if_disabled
130+
}
131+
132+
# kill switch
133+
exit_if_disabled() {
134+
if scw-metadata |grep -q "TAGS_[[:digit:]]=ubuntukernel_disabled" ; then
135+
fatal "ubuntukernel load disabled via server tag."
136+
fi
128137
}
129138

130139
#

0 commit comments

Comments
 (0)