[Bug 2011480] [NEW] /etc/network/if-up.d/resolved: 12: mystatedir: not found

CH 2011480 at bugs.launchpad.net
Mon Mar 13 22:01:28 UTC 2023


Public bug reported:

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.

** Affects: ifupdown (Ubuntu)
     Importance: Undecided
         Status: New

** Package changed: bind9 (Ubuntu) => ifupdown (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ifupdown in Ubuntu.
https://bugs.launchpad.net/bugs/2011480

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

Status in ifupdown package in Ubuntu:
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/2011480/+subscriptions




More information about the foundations-bugs mailing list