summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorJonathan Bauer2013-10-25 17:33:00 +0200
committerJonathan Bauer2013-10-25 17:33:00 +0200
commitac942445b6bf10c66a5432e84f6e72b20b3af9b9 (patch)
tree2f0f789561247d0955f6a035bbf7f1710507aa85 /remote
parent[debug] Target for debug in remote / target (diff)
downloadtm-scripts-ac942445b6bf10c66a5432e84f6e72b20b3af9b9.tar.gz
tm-scripts-ac942445b6bf10c66a5432e84f6e72b20b3af9b9.tar.xz
tm-scripts-ac942445b6bf10c66a5432e84f6e72b20b3af9b9.zip
[rootfs-stage32] set the root password in stage31 if given by the config file
Diffstat (limited to 'remote')
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/init5
1 files changed, 5 insertions, 0 deletions
diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init
index cc552137..5c087cf8 100755
--- a/remote/rootfs/rootfs-stage31/data/init
+++ b/remote/rootfs/rootfs-stage31/data/init
@@ -98,6 +98,11 @@ fi
tar -cp "/bin" "/sbin" "/usr/bin" "/usr/sbin" "/etc/functions.inc" | tar -xp -C "${FUTURE_ROOT}/opt/openslx/"
#echo 'blacklist pcspkr' >> /mnt/etc/modprobe.d/blacklist.conf
+# set the SLX_ROOT_PASS if given in config
+if [ ! -z "$SLX_ROOT_PASS" ]; then
+ sed -i "s/^root:[^:]*:/root:$SLX_ROOT_PASS:/" "${FUTURE_ROOT}/etc/shadow"
+fi
+
# one last debug shell if activated
[ $DEBUG -ge 1 ] && drop_shell "Requested Debug Shell: before switch_root."