wrong var declaration in if-up.d/resolved (nm-dispatcher[54417]: /etc/network/if-up.d/resolved: 12: mystatedir: not found)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ifupdown (Ubuntu) |
Fix Released
|
Undecided
|
Heinrich Schuchardt | ||
Jammy |
Fix Released
|
Medium
|
Joao Andre Simioni |
Bug Description
Syslog error:
nm-dispatche
I think it's because of this line:
if systemctl is-enabled systemd-resolved > /dev/null 2>&1; then
mystatedir statedir ifindex interface <------------- this is interpreted as a 'mystatedir' command and fails
interface
if [ ! "$interface" ]; then
Perhaps the intention was to 'export mystatedir statedir ...'
SRU for Jammy:
[ Impact ]
* /etc/network/
mystatedir statedir ifindex interface
And when this line is executed, mystatedir is not found (not a valid command)
and it generates an error log in /var/log/syslog and the terminal output.
It's not fatal, and the rest of the code gets executed, but it generates the
message.
# ifup ens3
/etc/
# ifdown ens3
/etc/
The fix accepted in kinetic is only to remove this line. The same fix can be
applied to Jammy.
[ Test Plan ]
With the new package installed, remove netplan configuration and add a valid
/etc/
# ifdown <interface>
# ifup <interface>
And confirm the messages are not displayed and the network configuration
succeeds.
[ Where problems could occur ]
If mystatedir would be a valid command or function, which is not the case,
that could break the script.
Changed in ifupdown (Ubuntu): | |
status: | Confirmed → Fix Committed |
assignee: | nobody → Heinrich Schuchardt (xypron) |
Changed in ifupdown (Ubuntu Jammy): | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: foundations-triage-discuss |
Changed in ifupdown (Ubuntu Jammy): | |
assignee: | nobody → Joao Andre Simioni (jasimioni) |
status: | Triaged → In Progress |
tags: | added: se-sponsor-halves |
The same applies for if-down.d/resolved