[Bug 2004003] [NEW] /etc/network/if-up.d/resolved: line 20: return: can only `return' from a function or sourced script

Nicholas Guriev 2004003 at bugs.launchpad.net
Fri Jan 27 09:32:28 UTC 2023


Public bug reported:

Just found the following errors in "systemctl status networking"

× networking.service - Raise network interfaces
     Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2023-01-27 12:26:29 MSK; 3min 10s ago
       Docs: man:interfaces(5)
    Process: 3963 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
   Main PID: 3963 (code=exited, status=1/FAILURE)
        CPU: 147ms

янв 27 12:26:29 gerbera systemd[1]: Starting Raise network interfaces...
янв 27 12:26:29 gerbera ifup[3976]: /etc/network/if-up.d/resolved: line 12: mystatedir: command not found
янв 27 12:26:29 gerbera ifup[3973]: /etc/network/if-up.d/resolved: line 20: return: can only `return' from a function or sourced script
янв 27 12:26:29 gerbera ifup[3969]: run-parts: /etc/network/if-up.d/resolved exited with return code 2
янв 27 12:26:29 gerbera ifup[3963]: ifup: failed to bring up lo
янв 27 12:26:29 gerbera systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
янв 27 12:26:29 gerbera systemd[1]: networking.service: Failed with result 'exit-code'.
янв 27 12:26:29 gerbera systemd[1]: Failed to start Raise network interfaces.

The error with mystatedir has been already reported as bug#1907878.
However, patches there do not fix unexpected return statement.

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


** Tags: jammy

-- 
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/2004003

Title:
  /etc/network/if-up.d/resolved: line 20: return: can only `return' from
  a function or sourced script

Status in ifupdown package in Ubuntu:
  New

Bug description:
  Just found the following errors in "systemctl status networking"

  × networking.service - Raise network interfaces
       Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
       Active: failed (Result: exit-code) since Fri 2023-01-27 12:26:29 MSK; 3min 10s ago
         Docs: man:interfaces(5)
      Process: 3963 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
     Main PID: 3963 (code=exited, status=1/FAILURE)
          CPU: 147ms

  янв 27 12:26:29 gerbera systemd[1]: Starting Raise network interfaces...
  янв 27 12:26:29 gerbera ifup[3976]: /etc/network/if-up.d/resolved: line 12: mystatedir: command not found
  янв 27 12:26:29 gerbera ifup[3973]: /etc/network/if-up.d/resolved: line 20: return: can only `return' from a function or sourced script
  янв 27 12:26:29 gerbera ifup[3969]: run-parts: /etc/network/if-up.d/resolved exited with return code 2
  янв 27 12:26:29 gerbera ifup[3963]: ifup: failed to bring up lo
  янв 27 12:26:29 gerbera systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
  янв 27 12:26:29 gerbera systemd[1]: networking.service: Failed with result 'exit-code'.
  янв 27 12:26:29 gerbera systemd[1]: Failed to start Raise network interfaces.

  The error with mystatedir has been already reported as bug#1907878.
  However, patches there do not fix unexpected return statement.

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




More information about the foundations-bugs mailing list