aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/config-rootpasswd.sh
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2017-02-05 23:56:43 +0100
committerGerd Hoffmann <kraxel@redhat.com>2017-02-05 23:56:43 +0100
commit0e9f58fb1bc248f7603e3b207e36e7dbf3f76d93 (patch)
tree20428e0847b801320e2bdcc0585c1e1c9c0e78c1 /scripts/config-rootpasswd.sh
parent02f69d18161510571c86dda97b3028e647c4303b (diff)
downloadimagefish-0e9f58fb1bc248f7603e3b207e36e7dbf3f76d93.tar.gz
config scripts
Diffstat (limited to 'scripts/config-rootpasswd.sh')
-rwxr-xr-xscripts/config-rootpasswd.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/config-rootpasswd.sh b/scripts/config-rootpasswd.sh
new file mode 100755
index 0000000..e0daf90
--- /dev/null
+++ b/scripts/config-rootpasswd.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+image="$1"
+passwd="$2"
+if test "$image" = "" -o "$passwd" = ""; then
+ echo "usage: $0 <image> <root-password>"
+ exit 1
+fi
+set -ex
+virt-customize -a "$image" --root-password "password:$passwd"