aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-02-22 11:18:34 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-02-28 22:10:08 +0100
commit7a2566ec8260ceacae81088ebe2ffe6526c3809e (patch)
treeebdddba9d316526dbb077ec1530fd2184345f4e2
parent6d5a5abc5f6e4e823991b64277c60667cfa37482 (diff)
downloadaports-7a2566ec8260ceacae81088ebe2ffe6526c3809e.tar.gz
aports-7a2566ec8260ceacae81088ebe2ffe6526c3809e.tar.bz2
aports-7a2566ec8260ceacae81088ebe2ffe6526c3809e.tar.xz
scripts/genrootfs.sh: make sure root login is disabled
(cherry picked from commit 72c7a7a3caf28c06289dc5f65e1756b38cfb00ca)
-rwxr-xr-xscripts/genrootfs.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/genrootfs.sh b/scripts/genrootfs.sh
index ac760e6e0d..5118027632 100755
--- a/scripts/genrootfs.sh
+++ b/scripts/genrootfs.sh
@@ -39,6 +39,9 @@ ${APK:-apk} fetch --keys-dir "$keys_dir" --no-cache \
--repositories-file "$repositories_file" \
--stdout --quiet alpine-base | tar -zx -C "$tmp" etc/
+# make sure root login is disabled
+sed -i -e 's/^root::/root:!:/' "$tmp"/etc/shadow
+
branch=edge
VERSION_ID=$(awk -F= '$1=="VERSION_ID" {print $2}' "$tmp"/etc/os-release)
case $VERSION_ID in