2023-04-27 04:02:16 |
CH |
description |
This error happens when you try to run ifup or ifdown:
```
# ifdown enp3s0
/etc/network/if-down.d/resolved: 12: mystatedir: not found
# ifup enp3s0
/etc/network/if-up.d/resolved: 12: mystatedir: not found
```
Here's the first lines of that script:
```
# head -n 12 /etc/network/if-up.d/resolved
#!/bin/sh
#
# Script fragment to make ifupdown supply DNS infromation to resolved
#
case "$ADDRFAM" in
inet|inet6) : ;;
*) exit 0 ;;
esac
if systemctl is-enabled systemd-resolved > /dev/null 2>&1; then
mystatedir statedir ifindex interface
```
I'm thinking that the word `local` should appear before `mystatedir` on line 12.
The `shellcheck` command is ok with that line, but only because it's not checking to see if `mystatedir` is an executable in the $PATH. |
This error happens when you try to run ifup or ifdown:
```
# ifdown enp3s0
/etc/network/if-down.d/resolved: 12: mystatedir: not found
# ifup enp3s0
/etc/network/if-up.d/resolved: 12: mystatedir: not found
```
Here's the first 12 lines of those scripts:
```
# head -n 12 /etc/network/if-up.d/resolved
#!/bin/sh
#
# Script fragment to make ifupdown supply DNS infromation to resolved
#
case "$ADDRFAM" in
inet|inet6) : ;;
*) exit 0 ;;
esac
if systemctl is-enabled systemd-resolved > /dev/null 2>&1; then
mystatedir statedir ifindex interface
```
I'm thinking that the word `local` should appear before `mystatedir` on line 12.
The `shellcheck` command is ok with that line, but only because it's not checking to see if `mystatedir` is an executable in the $PATH. |
|
2023-04-27 07:33:07 |
CH |
description |
This error happens when you try to run ifup or ifdown:
```
# ifdown enp3s0
/etc/network/if-down.d/resolved: 12: mystatedir: not found
# ifup enp3s0
/etc/network/if-up.d/resolved: 12: mystatedir: not found
```
Here's the first 12 lines of those scripts:
```
# head -n 12 /etc/network/if-up.d/resolved
#!/bin/sh
#
# Script fragment to make ifupdown supply DNS infromation to resolved
#
case "$ADDRFAM" in
inet|inet6) : ;;
*) exit 0 ;;
esac
if systemctl is-enabled systemd-resolved > /dev/null 2>&1; then
mystatedir statedir ifindex interface
```
I'm thinking that the word `local` should appear before `mystatedir` on line 12.
The `shellcheck` command is ok with that line, but only because it's not checking to see if `mystatedir` is an executable in the $PATH. |
This error happens when you try to run ifup or ifdown:
```
# ifdown enp3s0
/etc/network/if-down.d/resolved: 12: mystatedir: not found
# ifup enp3s0
/etc/network/if-up.d/resolved: 12: mystatedir: not found
```
Here's the first 12 lines of those scripts:
```
# head -n 12 /etc/network/if-up.d/resolved
#!/bin/sh
#
# Script fragment to make ifupdown supply DNS infromation to resolved
#
case "$ADDRFAM" in
inet|inet6) : ;;
*) exit 0 ;;
esac
if systemctl is-enabled systemd-resolved > /dev/null 2>&1; then
mystatedir statedir ifindex interface
```
I'm thinking that the word `local` used to appear before `mystatedir` on line 12, but that was when it was a function. When it was converted back from being a function, the 'local' keyword was removed, but the variables remained.
Either make it into a function again, or delete line 12. |
|