Commit 4d915099 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f4c498c7
......@@ -44,15 +44,18 @@ if [ $$ == 1 ]; then
# XXX source bashrc ?
# FIXME "/dev/tty: No such device or address"
test -n "$QDIR" || qdie "QDIR=?"
cd "$QDIR"
test -n "$QRUN" || qdie "QRUN=?"
set +e
$QRUN
test -n "$CWD" || qdie "CWD=?"
cd "$CWD"
test $# != 0 || qdie "no program to run"
cat /proc/cmdline
env
set +e -x
"$@" # run argv[1:] passes to init
echo "exit code: $?"
qshutdown
sleep 1d # give time to shutdown
qdie "unreachable"
fi
......@@ -94,8 +97,9 @@ qemu-system-$arch \
\
-kernel $kernel \
-append "ro rootfstype=9p rootflags=trans=virtio \
console=ttyS0 init=$(realpath $0) QDIR=$dir QRUN=$prog \
HOME="$HOME" LANG="$LANG" TERM="$TERM" PATH="$PATH" \
console=ttyS0 init="$(realpath $0)" \
CWD="$dir" HOME="$HOME" LANG="$LANG" TERM="$TERM" PATH="$PATH" \
-- $prog \
"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment