aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-01-20 11:57:20 +0100
committerJohn Ankarström <john@ankarstrom.se>2021-01-20 11:59:14 +0100
commit52cd7b76af482cf3ecbf0f9a857003506d8135fb (patch)
tree0db34398ecba6d8cd2b1cac74958fca83c4f7144 /etc
parente47fe43386fdcc603f11521e08d1865e0f381412 (diff)
downloadalpine-master.tar.gz
9vm: Introduce small delay in start functionHEADmaster
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.
Diffstat (limited to 'etc')
-rwxr-xr-xetc/init.d/9vm3
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