commit 81d47840411de01ad59b9f167e223893a32f7f96 parent a38e340d253bf2200f47ce48da14ea72980db32a Author: ccx <ccx@te2000.cz> Date: Mon, 18 Mar 2024 16:48:07 +0000 Argument handling in ns_run_unshared Diffstat:
M | sbin/ns_run_unshared | | | 14 | ++++++++------ |
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/sbin/ns_run_unshared b/sbin/ns_run_unshared @@ -31,7 +31,8 @@ multisubstitute { importas -D /mnt/volumes/containers/bin NS_BIN NS_BIN } -shift -n 1 # remove first argument so we get clean $@ below +# remove first argument so we don't have to deal with it with runblock +shift -n 1 # check we are PID1 (in a new PID namespace) getpid PID @@ -101,8 +102,9 @@ if { mount -o remount,ro dev } # * does pivot_root to change rootdir # * umounts all undesired filesystems # * execs into $@ -multisubstitute { - importas -i -u NS_FINAL_SCRIPT NS_FINAL_SCRIPT - elgetpositionals -} -runblock -r 1 emptyenv -c execlineb -S0 -c $NS_FINAL_SCRIPT $@ +importas -i -u NS_FINAL_SCRIPT NS_FINAL_SCRIPT +runblock -r 1 +elgetpositionals +emptyenv -c +execlineb -S0 -c $NS_FINAL_SCRIPT +$@