The && and || operators should be left-associative, since that is how they are treated in most other languages (including C and Unix shell). For example, in the command: dhcp net0 && goto dhcp_ok || echo No DHCP on net0 if the "dhcp net0" fails then the "echo" should be executed. After an "exit" or a successful "goto", further commands on the same line should never be executed. For example: goto somewhere && echo This should never be printed exit 0 && echo This should never be printed exit 1 && echo This should never be printed An "exit" should cause the current shell or script to terminate and return the specified exit status to its caller. For example: chain test.ipxe && echo Success || echo Failure [in test.ipxe] #!ipxe exit 0 should echo "Success". Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
31 |
|
31 |
|
32 |
|
32 |
|
33 |
|
33 |
|
|
34 |
|
|
34 |
|
35 |
|
35 |
|
36 |
|
36 |
|
37 |
|
|
|
||
38 |
|
39 |
|
39 |
|
40 |
|
40 |
|
41 |
|
41 |
|
|
|
42 |
|
|
|
|
42 |
|
|
|
43 |
|
|
43 |
|
44 |
|
44 |
|
45 |
|
45 |
|
46 |
|
46 |
|
47 |
|
47 |
|
48 |
|
48 |
|
49 |
|
49 |
|
|
|
|
50 |
|
|
50 |
|
51 |
|
51 |
|
52 |
|
52 |
|
53 |
|
|
|
||
196 |
|
197 |
|
197 |
|
198 |
|
198 |
|
199 |
|
199 |
|
|
|
200 |
|
|
|
201 |
|
|
|
202 |
|
|
|
203 |
|
|
|
204 |
|
|
|
205 |
|
|
|
206 |
|
|
|
207 |
|
|
|
208 |
|
|
|
209 |
|
|
|
|
200 |
|
|
210 |
|
201 |
|
211 |
|
202 |
|
212 |
|
|
|
|
203 |
|
|
213 |
|
204 |
|
214 |
|
|
|
|
205 |
|
|
215 |
|
206 |
|
216 |
|
207 |
|
217 |
|
208 |
|
218 |
|
209 |
|
219 |
|
|
|
|
210 |
|
|
220 |
|
211 |
|
221 |
|
212 |
|
222 |
|
|
|
|
213 |
|
|
223 |
|
214 |
|
224 |
|
|
|
|
215 |
|
|
225 |
|
216 |
|
226 |
|
217 |
|
227 |
|
218 |
|
|
|
||
229 |
|
220 |
|
230 |
|
221 |
|
231 |
|
222 |
|
232 |
|
|
|
|
223 |
|
|
233 |
|
224 |
|
234 |
|
225 |
|
235 |
|
226 |
|
236 |
|
|
|
|
227 |
|
|
237 |
|
228 |
|
238 |
|
229 |
|
239 |
|
230 |
|
240 |
|
231 |
|
241 |
|
232 |
|
242 |
|
233 |
|
243 |
|
|
|
244 |
|
|
|
|
234 |
|
|
245 |
|
235 |
|
246 |
|
236 |
|
247 |
|
|
|
|
237 |
|
|
248 |
|
238 |
|
249 |
|
239 |
|
250 |
|
240 |
|
251 |
|
|
|
|
241 |
|
|
252 |
|
242 |
|
253 |
|
243 |
|
254 |
|
244 |
|
255 |
|
245 |
|
256 |
|
246 |
|
257 |
|
|
|
|
247 |
|
|
258 |
|
248 |
|
259 |
|
249 |
|
260 |
|
250 |
|
|
251 |
|
|
|
252 |
|
|
|
253 |
|
|
|
254 |
|
|
|
255 |
|
|
|
256 |
|
|
|
257 |
|
|
|
258 |
|
|
|
259 |
|
|
|
260 |
|
|
|
261 |
|
|
|
262 |
|
|
|
263 |
|
|
|
264 |
|
|
|
265 |
|
|
|
266 |
|
|
|
267 |
|
|
|
268 |
|
|
|
269 |
|
|
|
270 |
|
|
|
271 |
|
|
|
272 |
|
|
|
273 |
|
|
|
274 |
|
|
|
275 |
|
|
|
276 |
|
|
|
277 |
|
|
|
278 |
|
|
261 |
|
279 |
|
262 |
|
280 |
|
263 |
|
281 |
|
264 |
|
282 |
|
265 |
|
|
|
|
283 |
|
|
266 |
|
284 |
|
267 |
|
285 |
|
268 |
|
286 |
|
269 |
|
287 |
|
270 |
|
|
|
|
288 |
|
|
271 |
|
289 |
|
272 |
|
290 |
|
273 |
|
291 |
|
274 |
|
292 |
|
|
293 |
|
|
275 |
|
294 |
|
276 |
|
295 |
|
277 |
|
|
|
278 |
|
|
|
279 |
|
|
|
280 |
|
296 |
|
281 |
|
297 |
|
282 |
|
298 |
|
|
|
||
291 |
|
307 |
|
292 |
|
308 |
|
293 |
|
309 |
|
|
310 |
|
|
294 |
|
311 |
|
295 |
|
312 |
|
296 |
|
313 |
|
297 |
|
314 |
|
298 |
|
|
|
|
315 |
|
|
299 |
|
316 |
|
300 |
|
317 |
|
301 |
|
|
|
302 |
|
|
|
|
318 |
|
|
|
319 |
|
|
|
320 |
|
|
|
321 |
|
|
303 |
|
322 |
|
304 |
|
|
|
305 |
|
|
|
|
323 |
|
|
|
324 |
|
|
306 |
|
325 |
|
307 |
|
326 |
|
308 |
|
|
|
309 |
|
|
|
|
327 |
|
|
|
328 |
|
|
|
329 |
|
|
|
330 |
|
|
310 |
|
331 |
|
|
332 |
|
|
|
333 |
|
|
|
334 |
|
|
311 |
|
335 |
|
312 |
|
336 |
|
313 |
|
337 |
|
|
|
||
322 |
|
346 |
|
323 |
|
347 |
|
324 |
|
348 |
|
325 |
|
|
|
|
349 |
|
|
326 |
|
350 |
|
327 |
|
351 |
|
328 |
|
352 |
|
|
|
||
373 |
|
397 |
|
374 |
|
398 |
|
375 |
|
399 |
|
376 |
|
|
|
377 |
|
|
|
|
400 |
|
|
|
401 |
|
|
378 |
|
402 |
|
379 |
|
403 |
|
380 |
|
404 |
|
|
|
||
84 |
|
84 |
|
85 |
|
85 |
|
86 |
|
86 |
|
87 |
|
|
|
88 |
|
|
|
|
87 |
|
|
89 |
|
88 |
|
90 |
|
89 |
|
91 |
|
90 |
|
|
|
||
34 |
|
34 |
|
35 |
|
35 |
|
36 |
|
36 |
|
|
37 |
|
|
37 |
|
38 |
|
38 |
|
39 |
|
39 |
|
40 |
|
|
|
||
106 |
|
107 |
|
107 |
|
108 |
|
108 |
|
109 |
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
|
|
|
113 |
|
|
|
114 |
|
|
|
115 |
|
|
|
|
110 |
|
|
|
111 |
|
|
116 |
|
112 |
|
117 |
|
113 |
|
118 |
|
114 |
|
|
|
||
292 |
|
288 |
|
293 |
|
289 |
|
294 |
|
290 |
|
|
291 |
|
|
|
292 |
|
|
|
293 |
|
|
295 |
|
294 |
|
296 |
|
295 |
|
297 |
|
296 |
|
|
|
||
23 |
|
23 |
|
24 |
|
24 |
|
25 |
|
25 |
|
26 |
|
|
|
27 |
|
|
|
28 |
|
26 |
|
|
|
||
9 |
|
9 |
|
10 |
|
10 |
|
11 |
|
11 |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
12 |
|
34 |
|
13 |
|
35 |
|
14 |
|
36 |
|