[Bug 2017840] [NEW] ifupdown resolved script has typo
CH
2017840 at bugs.launchpad.net
Thu Apr 27 03:57:47 UTC 2023
Public bug reported:
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.
** Affects: systemd (Ubuntu)
Importance: Undecided
Status: New
** Description changed:
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:
+ 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
+ inet|inet6) : ;;
+ *) exit 0 ;;
+ esac
if systemctl is-enabled systemd-resolved > /dev/null 2>&1; then
- mystatedir statedir ifindex interface
+ 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.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2017840
Title:
ifupdown resolved script has typo
Status in systemd package in Ubuntu:
New
Bug 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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2017840/+subscriptions
More information about the foundations-bugs
mailing list