aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-05-31 11:08:02 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2017-06-08 16:57:19 +0200
commit0b1bc225792314884ec6ea366ff99baf06b3712d (patch)
tree626967355a24cfd021afa0876043f5085dea89f3
parent37114112472de9bfa1831fc83ca2b553997b4bc5 (diff)
downloadalpine-conf-0b1bc225792314884ec6ea366ff99baf06b3712d.tar.bz2
alpine-conf-0b1bc225792314884ec6ea366ff99baf06b3712d.tar.xz
setup-alpine: add -e to allow empty root password
-rw-r--r--setup-alpine.in10
1 files changed, 8 insertions, 2 deletions
diff --git a/setup-alpine.in b/setup-alpine.in
index d04482d..561d4ef 100644
--- a/setup-alpine.in
+++ b/setup-alpine.in
@@ -29,6 +29,7 @@ usage() {
options:
-a Create Alpine Linux overlay file
-c Create answer file (do not install anything)
+ -e Empty root password
-f Answer file to use installation
-h Show this help
-q Quick mode. Ask fewer questions.
@@ -36,11 +37,12 @@ usage() {
exit 1
}
-while getopts "af:c:hq" opt ; do
+while getopts "aef:c:hq" opt ; do
case $opt in
a) ARCHIVE=yes;;
f) USEANSWERFILE="$OPTARG";;
c) CREATEANSWERFILE="$OPTARG";;
+ e) empty_root_password=1;;
h) usage;;
q) quick=1; APKREPOSOPTS="-1"; HOSTNAMEOPTS="alpine";;
*) usage;;
@@ -137,7 +139,11 @@ grep '^iface.*dhcp' $ROOT/etc/network/interfaces > /dev/null ||\
$PREFIX/sbin/setup-dns ${DNSOPTS}
# set root password
-[ -z "$NOCOMMIT" ] && while ! passwd ; do echo "Please retry." ; done
+if [ -z "$NOCOMMIT" ] && [ -z "$empty_root_password" ]; then
+ while ! passwd ; do
+ echo "Please retry."
+ done
+fi
if [ -z "$quick" ]; then
# pick timezone