mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 09:17:07 +03:00
Merge pull request #242191 from tie/systemd-required-for-online-range
This commit is contained in:
commit
3c3ef90189
@ -517,17 +517,24 @@ let
|
||||
(assertValueOneOf "Unmanaged" boolValues)
|
||||
(assertInt "Group")
|
||||
(assertRange "Group" 0 2147483647)
|
||||
(assertValueOneOf "RequiredForOnline" (boolValues ++ [
|
||||
"missing"
|
||||
"off"
|
||||
"no-carrier"
|
||||
"dormant"
|
||||
"degraded-carrier"
|
||||
"carrier"
|
||||
"degraded"
|
||||
"enslaved"
|
||||
"routable"
|
||||
]))
|
||||
(assertValueOneOf "RequiredForOnline" (boolValues ++ (
|
||||
let
|
||||
# https://freedesktop.org/software/systemd/man/networkctl.html#missing
|
||||
operationalStates = [
|
||||
"missing"
|
||||
"off"
|
||||
"no-carrier"
|
||||
"dormant"
|
||||
"degraded-carrier"
|
||||
"carrier"
|
||||
"degraded"
|
||||
"enslaved"
|
||||
"routable"
|
||||
];
|
||||
operationalStateRanges = concatLists (imap0 (i: min: map (max: "${min}:${max}") (drop i operationalStates)) operationalStates);
|
||||
in
|
||||
operationalStates ++ operationalStateRanges
|
||||
)))
|
||||
(assertValueOneOf "RequiredFamilyForOnline" [
|
||||
"ipv4"
|
||||
"ipv6"
|
||||
|
Loading…
Reference in New Issue
Block a user