mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
If configuring the network times out, there will be no /run/net-*.conf
files present, and the attempt to source any interface config file will
fail. In this failure mode, dash (or 'bash --posix') immediately exits,
regardless of 'set -e' or not.
This precludes a caller from (cleanly) handling network bring-up
failure, particularly if the caller cares about the variables set from
sourcing the ipconfig config file.
paul@haley ~ % cat repro.sh
#!/bin/sh
. /nonexistent
echo hello
paul@haley ~ % dash ./repro.sh
./repro.sh: 3: .: cannot open /nonexistent: No such file
paul@haley ~ % sh ./repro.sh
./repro.sh: 3: .: cannot open /nonexistent: No such file
paul@haley ~ % bash ./repro.sh
./repro.sh: line 3: /nonexistent: No such file or directory
hello
paul@haley ~ % bash --posix ./repro.sh
./repro.sh: line 3: /nonexistent: No such file or directory
paul@haley ~ %
Co-authored-by: Pierre Neyron <pierre.neyron@imag.fr>
Closes: #1025730