tools/create-gce-image.sh: ignore SIGINT

If the script is aborted at an unfortunate point, it leaves the whole system broken.
E.g. we've seen that fdisk cannot update partition table until the next reboot.
If you really need to kill it, use a different signal. But better wait.
This commit is contained in:
Dmitry Vyukov 2017-07-17 14:45:10 +02:00
parent 8382eb648f
commit 7c1ee0634b
2 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,8 @@ const createImageScript = `#!/bin/bash
set -eux
trap "" SIGINT
if [ ! -e $1/sbin/init ]; then
echo "usage: create-gce-image.sh /dir/with/user/space/system /path/to/bzImage"
exit 1

View File

@ -42,6 +42,11 @@
set -eux
# If the script is aborted at an unfortunate point, it leaves the whole system broken.
# E.g. we've seen that fdisk cannot update partition table until the next reboot.
# If you really need to kill it, use a different signal. But better wait.
trap "" SIGINT
if [ ! -e $1/sbin/init ]; then
echo "usage: create-gce-image.sh /dir/with/user/space/system /path/to/bzImage"
exit 1