diff options
author | John Ankarström <john@ankarstrom.se> | 2021-01-20 11:57:20 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-01-20 11:59:14 +0100 |
commit | 52cd7b76af482cf3ecbf0f9a857003506d8135fb (patch) | |
tree | 0db34398ecba6d8cd2b1cac74958fca83c4f7144 | |
parent | e47fe43386fdcc603f11521e08d1865e0f381412 (diff) | |
download | alpine-52cd7b76af482cf3ecbf0f9a857003506d8135fb.tar.gz |
Otherwise, pgrep will fail, because screen + QEMU
takes a fraction of a second longer to start.
I found it simplest to sleep a whole second
before running pgrep.
-rwxr-xr-x | etc/init.d/9vm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/init.d/9vm b/etc/init.d/9vm index 1a13fd9..24d1804 100755 --- a/etc/init.d/9vm +++ b/etc/init.d/9vm @@ -5,7 +5,7 @@ description='Plan 9 virtual machine' VMPATH=/9 SESSION=9vm -CMD='sh /9/startcon' +CMD=/9/startcon PATTERN=qemu-system-i386 depend() { @@ -15,6 +15,7 @@ depend() { start() { ebegin Starting Plan 9 virtual machine (cd $VMPATH && screen -h 1024 -dmS $SESSION $CMD) + sleep 1 if pgrep -f "$PATTERN" > /dev/null then eend 0 |