summaryrefslogtreecommitdiffstats
path: root/remote/rootfs
diff options
context:
space:
mode:
authorSimon Rettberg2015-10-26 10:51:41 +0100
committerSimon Rettberg2015-10-26 10:51:41 +0100
commit77a4343a67267b95fdc07cc24400e34fc5e1b851 (patch)
tree89969da6b6e4ac6bbef6aecd20dc7f6ff172594d /remote/rootfs
parent[redsocks] Only check if proxy if needed when mode is set to "auto" (diff)
downloadtm-scripts-77a4343a67267b95fdc07cc24400e34fc5e1b851.tar.gz
tm-scripts-77a4343a67267b95fdc07cc24400e34fc5e1b851.tar.xz
tm-scripts-77a4343a67267b95fdc07cc24400e34fc5e1b851.zip
[rootfs-*] Disable 'demo' login, support $SLX_DEMO_PASS to set a password via config
Diffstat (limited to 'remote/rootfs')
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/init4
-rw-r--r--remote/rootfs/rootfs-stage32/module.build4
2 files changed, 6 insertions, 2 deletions
diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init
index 9daa6d58..7c66cd11 100755
--- a/remote/rootfs/rootfs-stage31/data/init
+++ b/remote/rootfs/rootfs-stage31/data/init
@@ -95,6 +95,10 @@ cp -a "/inc/functions" "${FUTURE_ROOT}/opt/openslx/inc/"
if [ ! -z "$SLX_ROOT_PASS" ]; then
sed -i "s#^root:[^:]*:#root:$SLX_ROOT_PASS:#" "${FUTURE_ROOT}/etc/shadow"
fi
+# set the SLX_DEMO_PASS if given in config
+if [ ! -z "$SLX_DEMO_PASS" ]; then
+ sed -i "s#^demo:[^:]*:#demo:$SLX_DEMO_PASS:#" "${FUTURE_ROOT}/etc/shadow"
+fi
# one last debug shell if activated
[ $DEBUG -ge 1 ] && drop_shell "Requested Debug Shell: before switch_root."
diff --git a/remote/rootfs/rootfs-stage32/module.build b/remote/rootfs/rootfs-stage32/module.build
index d855f5e5..4fbc26b5 100644
--- a/remote/rootfs/rootfs-stage32/module.build
+++ b/remote/rootfs/rootfs-stage32/module.build
@@ -104,8 +104,8 @@ post_copy() {
add_user "nobody"
# setup root account
- USER=root add_user
- DEMO_ID="$(USER=demo PASSWORD=demo USERHOME=/home/demo USERSHELL=/bin/bash add_user)"
+ PASSWORD= USER=root add_user
+ DEMO_ID="$(USER=demo PASSWORD= USERHOME=/home/demo USERSHELL=/bin/bash add_user)"
mkdir -p "${TARGET_BUILD_DIR}/root"
mkdir -p "${TARGET_BUILD_DIR}/home/demo"