diff options
author | Jouke Witteveen <j.witteveen@gmail.com> | 2012-11-04 22:05:44 +0100 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2012-11-04 22:05:44 +0100 |
commit | 75359ecb9dc01dc5f2486e13c792a85c3807cfb1 (patch) | |
tree | 484611622fdb37eda5726d1bc49ad7b02f3bea40 | |
parent | 3c5d969d87b30e373156d2fde268850a201fa898 (diff) | |
download | netctl-75359ecb9dc01dc5f2486e13c792a85c3807cfb1.tar.gz netctl-75359ecb9dc01dc5f2486e13c792a85c3807cfb1.tar.xz |
Don't fail on no recorded profile
It is important that systemd considers a netcfg-daemon startup
succesfull, even if there is no recorded state to restore and
/etc/conf.d/netcfg contains NETWORKS=(last).
If it doesn't, it will never call `netcfg-daemon stop`, preventing the
state file to get created.
FS#32429
-rwxr-xr-x | scripts/netcfg-daemon | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/netcfg-daemon b/scripts/netcfg-daemon index 98f96d6..b3111da 100755 --- a/scripts/netcfg-daemon +++ b/scripts/netcfg-daemon @@ -16,7 +16,12 @@ case "$1" in if [[ ${#NETWORKS[@]} -eq 1 ]]; then case $NETWORKS in last) - [[ -e $LAST_STATE ]] || exit_err "No recorded netcfg state to restore" + if [[ ! -e $LAST_STATE ]]; then + report_err "No recorded netcfg state to restore" + # This counts as successful startup since the daemon + # should be stopped on shutdown. + exit 0 + fi # The order in LAST_STATE is meaningless so we can just as # well start the profiles in parallel. |