Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwlive.git;a=commitdiff;h=3417d228c26706848fc8e600df71cf411bdd90d3

commit 3417d228c26706848fc8e600df71cf411bdd90d3
Author: Janny <[EMAIL PROTECTED]>
Date:   Tue Mar 4 14:42:25 2008 +0100

fwlive-cmline
* add two options to cmdline parameters
* autoexec and passwd

diff --git a/parse_cmdline.in b/parse_cmdline.in
index b0035e9..bbe4749 100644
--- a/parse_cmdline.in
+++ b/parse_cmdline.in
@@ -67,3 +67,33 @@ printf ' 
================================================================
}

gen_issue > /etc/issue
+
+. /usr/lib/liblinuxlive
+
+# change password
+NEWROOTPASS="`cmdline_value passwd`"
+if [ "$NEWROOTPASS" = "ask" ]; then
+       echo -ne "\nEnter new password for root: "
+       read -s NEWROOTPASS
+fi
+
+if [ ! "$NEWROOTPASS" = "" ]; then
+       echo "root:$NEWROOTPASS" | /usr/sbin/chpasswd
+fi
+
+# debug
+#if grep debug /proc/cmdline 2>/dev/null >/dev/null; then
+#       show_debug_banner
+#       /mnt/live/bin/ash || /bin/bash || /bin/sh
+#fi
+
+# if autoexec= boot parameter is present, automatically start the command 
given.
+# If you need to execute several commands, separate them using ';'
+# If you need to use spaces in your command, use ~ instead
+# If you wish to reboot/poweroff after the command's execution is finished,
+#  simply use autoexec=yourCommand;poweroff for example.
+AUTOCMD=$(cmdline_value "autoexec" | tr "~" " ")
+if [ "$AUTOCMD" != "" ]; then
+       echo "starting autoexec command:  su --login -c \"$AUTOCMD\""
+       su --login -c "$AUTOCMD"
+fi
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to