summaryrefslogtreecommitdiffstats
path: root/source/installer/sources/initrd/etc/rc.d/rc.S
diff options
context:
space:
mode:
Diffstat (limited to 'source/installer/sources/initrd/etc/rc.d/rc.S')
-rwxr-xr-xsource/installer/sources/initrd/etc/rc.d/rc.S10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/installer/sources/initrd/etc/rc.d/rc.S b/source/installer/sources/initrd/etc/rc.d/rc.S
index fcd5fea2c..a5c52f548 100755
--- a/source/installer/sources/initrd/etc/rc.d/rc.S
+++ b/source/installer/sources/initrd/etc/rc.d/rc.S
@@ -13,6 +13,16 @@
# Mount sysfs next:
/sbin/mount -v sysfs /sys -t sysfs 1> /dev/null
+# Set a root password for the Slackware Installer if set as a Kernel cmdline:
+# This is intended for network installations where otherwise the root password
+# would be unset.
+# Note: this does not configure the OS root password.
+# Passwords should be set as follows within the Kernel cmdline:
+# instrootpw=yourpassword
+if grep.bin -qoP 'instrootpw=\K\S+' /proc/cmdline ; then
+ /bin/echo "root:$( grep.bin -oP 'instrootpw=\K\S+' /proc/cmdline )" | /bin/busybox chpasswd
+fi
+
# Activate swap:
/sbin/swapon -a 1> /dev/null