Displaying 1 result from an estimated 1 matches for "command1crcommand2crcommand3".
2009 Jan 01
1
OT: Question on running command from boot menu
...pt to process the cmdline if anything in the run=" " exists.
### 12/31/20008 added to allow running command from grub
### add run="command line" to the grub line
### creates /tmp/runcmd to stop running twice.
### added sed CR filtering to allow multi-line commands
### run="command1CRcommand2CRcommand3"
if [ ! -s "/tmp/runcmd" ] ; then
cat /proc/cmdline | grep run | cut -d\" -f 2 | sed -e 's/CR/\n/g' >/tmp/runcmd;
if [ -s /tmp/runcmd ] ; then
sh /tmp/runcmd
sleep 10;
fi
fi
The above system does seem to work in my limited test, and it would be
rathe...