diff options
| author | Mark Nipper <nipsy@bitgnome.net> | 2026-07-27 11:49:14 -0700 |
|---|---|---|
| committer | Mark Nipper <nipsy@bitgnome.net> | 2026-07-27 11:49:14 -0700 |
| commit | 015f5b2d6bb56df2a85b068a2934366cc7e705a8 (patch) | |
| tree | 0f4615771eb85e5379fb5b00924411435548d700 | |
| parent | 77bec9fce38ab04a1bd2d147119eb28ffc466d44 (diff) | |
| download | nix-015f5b2d6bb56df2a85b068a2934366cc7e705a8.tar nix-015f5b2d6bb56df2a85b068a2934366cc7e705a8.tar.gz nix-015f5b2d6bb56df2a85b068a2934366cc7e705a8.tar.bz2 nix-015f5b2d6bb56df2a85b068a2934366cc7e705a8.tar.lz nix-015f5b2d6bb56df2a85b068a2934366cc7e705a8.tar.xz nix-015f5b2d6bb56df2a85b068a2934366cc7e705a8.tar.zst nix-015f5b2d6bb56df2a85b068a2934366cc7e705a8.zip | |
Fix typos
| -rw-r--r-- | home/root/arrakis.nix | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/home/root/arrakis.nix b/home/root/arrakis.nix index 7712609..ff16837 100644 --- a/home/root/arrakis.nix +++ b/home/root/arrakis.nix @@ -15,12 +15,12 @@ zparseopts -D -E -A opts -- d h l x # enable XTRACE shell option for full debugging output of scripts - if (( ${+opts[-x]} )); then + if (( ''${+opts[-x]} )); then set -x fi - if ! (( ${+opts[-l]} )) && [[ -z "${1}" ]] || (( ${+opts[-h]} )); then - echo "usage: ${0:t} [ -h ] [ -x ] { -d handle | -l | cidr }" >&2 + if ! (( ''${+opts[-l]} )) && [[ -z "''${1}" ]] || (( ''${+opts[-h]} )); then + echo "usage: ''${0:t} [ -h ] [ -x ] { -d handle | -l | cidr }" >&2 echo ' -d delete a rule by handle; handle must be specified ( nft -a list ruleset ) -h this message @@ -35,29 +35,29 @@ nft -a list ruleset | sed -ne '/\tchain games {/,/\t}$/p' } - if (( ${+opts[-d]} )); then + if (( ''${+opts[-d]} )); then - handle="${1}" - rule=$(nft -a list ruleset | grep ' # handle '"${handle}"'$') + handle="''${1}" + rule=$(nft -a list ruleset | grep ' # handle '"''${handle}"'$') - if [[ -z "${rule}" ]]; then + if [[ -z "''${rule}" ]]; then echo 'no matching handle found!' >&2 exit 1 else - nft delete rule inet nixos-fw games handle ${handle} + nft delete rule inet nixos-fw games handle ''${handle} list_games_chain fi - elif (( ${+opts[-l]} )); then + elif (( ''${+opts[-l]} )); then list_games_chain else - cidr="${1}" - nft insert rule inet nixos-fw games 'ip saddr '"${cidr}"' counter accept' + cidr="''${1}" + nft insert rule inet nixos-fw games 'ip saddr '"''${cidr}"' counter accept' list_games_chain fi |
