diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-07-17 14:45:10 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-07-17 14:45:41 +0200 |
| commit | 7c1ee0634b4335bd7b31b2ef063fffbcfa3b6484 (patch) | |
| tree | 44d5506995072502463d73035a3941bd9aaedab3 | |
| parent | 8382eb648fe51db07a0a20d413f61d4a46ab6131 (diff) | |
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.
| -rw-r--r-- | pkg/kernel/generated.go | 2 | ||||
| -rwxr-xr-x | tools/create-gce-image.sh | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/pkg/kernel/generated.go b/pkg/kernel/generated.go index ba84757c4..34ce6720d 100644 --- a/pkg/kernel/generated.go +++ b/pkg/kernel/generated.go @@ -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 diff --git a/tools/create-gce-image.sh b/tools/create-gce-image.sh index 184581563..f0845e96e 100755 --- a/tools/create-gce-image.sh +++ b/tools/create-gce-image.sh @@ -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 |
