If an interface is missing(say eth0) and one starts net.eth0, there is always an error. Could netifrc add support for a non error exit if I/F is missing and config_eth0="noop" is set ?
This would work for us: --- net.lo.org 2019-09-24 17:39:41.797917024 +0200 +++ net.lo 2019-09-24 18:14:39.277917024 +0200 @@ -571,6 +571,9 @@ fi done + eval our_config=\$config_${IFVAR} + [ _exists ] && [ "$our_config" = "noop" ] && return 0 +
Can you clarify which version this diff is against? Conceptually, this idea is mostly ok, but if something depends on IPv6 auto-conf on an interface which comes after a config_IFVAR=noop , then it could be problematic. would it be ok to put it behind an extra config setting? missing_behavior_IFVAR=silent With knobs of: - fatal: default - warning: warning with no failure - silent: no warning, no failure
(In reply to Robin Johnson from comment #2) > Can you clarify which version this diff is against? Oh, that was an older version: 0.3.1 Our target has not upgrade netifrc yet. > > Conceptually, this idea is mostly ok, but if something depends on IPv6 > auto-conf on an interface which comes after a config_IFVAR=noop , then it > could be problematic. I don't understand but I am no expert either :) One could continue and just make sure not to do any operation if noop is set. Isn't that the true meaning of noop ? > > would it be ok to put it behind an extra config setting? > missing_behavior_IFVAR=silent hmm, you mean missing_behavior_eth0=silent in conf.d/net ? That would work as well, but then one must make sure every call to ifconfig, ip , route etc. is redirected to stderr I think > > With knobs of: > - fatal: default > - warning: warning with no failure > - silent: no warning, no failure
(In reply to Joakim Tjernlund from comment #3) > (In reply to Robin Johnson from comment #2) > > Can you clarify which version this diff is against? > > Oh, that was an older version: 0.3.1 > Our target has not upgrade netifrc yet. > > > > > Conceptually, this idea is mostly ok, but if something depends on IPv6 > > auto-conf on an interface which comes after a config_IFVAR=noop , then it > > could be problematic. > > I don't understand but I am no expert either :) > One could continue and just make sure not to do any operation if noop > is set. Isn't that the true meaning of noop ? Maybe config_eth="" could be the trigger instead?
Any progress on this ?