diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2017-06-30 22:46:39 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-06-30 22:46:39 +0200 |
commit | cf925e6a02ef9ed4bd348c93f3c80d7358a45902 (patch) | |
tree | 2a8273f582c5288877bd0a87902eceafd3e8e5ef | |
parent | 24fb940ed4104ffdef3723b2ea894b394a8416e2 (diff) | |
download | imagefish-cf925e6a02ef9ed4bd348c93f3c80d7358a45902.tar.gz |
add config-no-initial-setup.sh
-rw-r--r-- | scripts/config-no-initial-setup.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/config-no-initial-setup.sh b/scripts/config-no-initial-setup.sh new file mode 100644 index 0000000..f65e4d3 --- /dev/null +++ b/scripts/config-no-initial-setup.sh @@ -0,0 +1,21 @@ +#!/bin/sh +image="$1" +if test "$image" = ""; then + echo "usage: $0 <image>" + exit 1 +fi + +WORK="${TMPDIR-/tmp}/${0##*/}-$$" +mkdir "$WORK" || exit 1 +trap 'rm -rf "$WORK"' EXIT + +cat <<EOF > "$WORK/script" + +# turn off initial-setup +delete /etc/systemd/system/multi-user.target.wants/initial-setup.service +delete /etc/systemd/system/graphical.target.wants/initial-setup.service + +EOF + +set -ex +virt-customize -a "$image" --no-network --commands-from-file "$WORK/script" |