X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=3a5ab9d59b681d076120e79f887ffbc76d229ff0;hb=5c8530653c87af3757a2c649772e0405bcd143a0;hp=fdb2c060e6de9a0742e667d585f768be98b9001b;hpb=602a1874cc11a7d371890cdae4c0dc982267ea89;p=distro-setup diff --git a/brc2 b/brc2 index fdb2c06..3a5ab9d 100644 --- a/brc2 +++ b/brc2 @@ -1873,6 +1873,10 @@ servicepid() { sdnbash() { # systemd namespace bash local unit pid + if (( $# != 0 )); then + echo $0: error wrong number of args >&2 + return 1 + fi unit=$1 pid=$(servicepid $unit) m sudo nsenter -t $pid -n -m sudo -u $USER -i bash @@ -1880,6 +1884,10 @@ sdnbash() { # systemd namespace bash sdncmd() { # systemd namespace cmd local unit pid + if (( $# != 0 )); then + echo $0: error wrong number of args >&2 + return 1 + fi unit=$1 shift pid=$(servicepid $unit)