diff --git a/sys/man/8/9boot b/sys/man/8/9boot index 44c1c8c36..bf1f204ed 100644 --- a/sys/man/8/9boot +++ b/sys/man/8/9boot @@ -36,6 +36,12 @@ is specified, the first parameter that matches the prefix is removed. If the .IR prefix argument is omitted, the whole configuration will be reset. +If the word +.B wait +appears in the configuration then +.IR 9boot +will return to the console prompt after processing the file. + The word .B boot will end the console and resume booting the kernel. diff --git a/sys/src/boot/pc/mkfile b/sys/src/boot/pc/mkfile index 779490520..3ef82e159 100644 --- a/sys/src/boot/pc/mkfile +++ b/sys/src/boot/pc/mkfile @@ -55,10 +55,11 @@ test.iso: 9bootiso rm -fr tmp $target mkdir tmp mkdir tmp/386 + mkdir tmp/cfg cp 9bootiso tmp/386 cp /386/9pcf tmp/386 - mkdir tmp/cfg - echo 'bootfile=/386/9pcf' >tmp/cfg/plan9.ini + cp /sys/lib/dist/cfg/plan9.ini tmp/cfg/plan9.ini + echo wait >>tmp/cfg/plan9.ini disk/mk9660 -B 386/9bootiso -p /sys/lib/sysconfig/proto/allproto -s tmp $target rm -fr tmp diff --git a/sys/src/boot/pc/sub.c b/sys/src/boot/pc/sub.c index 5087ffc08..8140508dc 100644 --- a/sys/src/boot/pc/sub.c +++ b/sys/src/boot/pc/sub.c @@ -189,10 +189,11 @@ char* configure(void *f, char *path) { char line[64], *kern, *s, *p; - int inblock, n; + int inblock, nowait, n; Clear: kern = 0; + nowait = 1; inblock = 0; memset(BOOTLINE, 0, BOOTLINELEN); @@ -209,8 +210,14 @@ Loop: inblock = memcmp("[common]", line, 8); continue; } - if(!memcmp("boot", line, 5)) + if(!memcmp("boot", line, 5)){ + nowait=1; break; + } + if(!memcmp("wait", line, 5)){ + nowait=0; + continue; + } if(!memcmp("clear", line, 5)){ if(line[5] == 0){ print("ok"); @@ -249,7 +256,7 @@ Loop: close(f); f = 0; - if(kern && timeout(1000)) + if(kern && (nowait==0 || timeout(1000))) goto Loop; }