4 while(getline <"/n/9fat/plan9-3e.ini" > 0){
7 m = substr($0, 2, length($0)-2)
10 if(m=="menu" && $0 ~ /^menuitem=4e,/)
16 while(getline <"/tmp/plan9.ini" > 0)
17 a["4e"] = a["4e"] $0 "\n"
19 if(a["menu"] == "" && haveold){
20 a["menu"] = "menuitem=3e, Plan 9 Third Edition\n"
24 if(a["common"] != ""){
26 if(i != "4e" && i != "common" && i != "menu")
27 a[i] = a["common"] a[i]
31 bootdisk4e=ENVIRON["fs"]
32 gsub("/dev/", "boot(args|disk|file)=local!#S/", bootdisk4e)
38 print "menuitem=4e, Plan 9 Fourth Edition"
49 # BUG: if rootdir is already there we should rewrite it
50 # sometimes into /3e/whatwasthere
51 if(a[i] ~ bootdisk4e && !(a[i] ~ /rootdir=/))
52 a[i] = "rootdir=/root/3e\n" a[i]
54 gsub(/9fat!9pcdisk/, "9fat!9pc3e", a[i])