/etc/network/if-up.d/resolved: 12: mystatedir: not found

Bug #2011480 reported by CH
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
New
Undecided
Unassigned

Bug Description

We're using ifupdown-0.8.36+nmu1ubuntu3.deb on Ubuntu 22.04, and when the system starts, it prints this line in /var/log/syslog and the journal:

Mar 13 14:18:15 hostname-goes-here ifup[506]: /etc/network/if-up.d/resolved: 12: mystatedir: not found

The relevant lines in /etc/network/if-up.d/resolved:

  1 #!/bin/sh
  2 #
  3 # Script fragment to make ifupdown supply DNS infromation to resolved
  4 #
  5
  6 case "$ADDRFAM" in
  7 inet|inet6) : ;;
  8 *) exit 0 ;;
  9 esac
 10
 11 if systemctl is-enabled systemd-resolved > /dev/null 2>&1; then
 12 mystatedir statedir ifindex interface
 13
 14 interface=$IFACE
 15 if [ ! "$interface" ]; then
 16 return
 17 fi

Surprisingly, the same line is present in /etc/network/if-down.d/resolved and causes the same error message.

Given that line 16 says 'return', I'm guessing that this used to be a function, and so line 12 might have started with 'local'...?

Fortunately, this is just a cosmetic problem, generating a few errors in the system logs.

CH (pdragon99)
affects: bind9 (Ubuntu) → ifupdown (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.