diff options
author | xeji <xeji@cat3.de> | 2018-03-04 13:35:20 +0100 |
---|---|---|
committer | xeji <xeji@cat3.de> | 2018-03-07 22:37:40 +0100 |
commit | fbc0b8282e5bca77f9bfcdf27190a7a63d0a65df (patch) | |
tree | 4641b0a63cab5b7e4b94011ce7e933ed463ece70 /nixos/modules/virtualisation/xen-dom0.nix | |
parent | 1deb779a7adb5d70bdb1077da31501e393b25c8e (diff) |
xen: fix broken version comparisons
string compare breaks with xen 4.10 (because "4.10" < "4.8")
Diffstat (limited to 'nixos/modules/virtualisation/xen-dom0.nix')
-rw-r--r-- | nixos/modules/virtualisation/xen-dom0.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/virtualisation/xen-dom0.nix b/nixos/modules/virtualisation/xen-dom0.nix index afc5a42f8b4e..11aeb31730e9 100644 --- a/nixos/modules/virtualisation/xen-dom0.nix +++ b/nixos/modules/virtualisation/xen-dom0.nix @@ -262,7 +262,7 @@ in mkdir -p /var/lib/xen # so we create them here unconditionally. grep -q control_d /proc/xen/capabilities ''; - serviceConfig = if cfg.package.version < "4.8" then + serviceConfig = if (builtins.compareVersions cfg.package.version "4.8" < 0) then { ExecStart = '' ${cfg.stored}${optionalString cfg.trace " -T /var/log/xen/xenstored-trace.log"} --no-fork ''; @@ -275,7 +275,7 @@ in NotifyAccess = "all"; }; postStart = '' - ${optionalString (cfg.package.version < "4.8") '' + ${optionalString (builtins.compareVersions cfg.package.version "4.8" < 0) '' time=0 timeout=30 # Wait for xenstored to actually come up, timing out after 30 seconds @@ -320,7 +320,7 @@ in serviceConfig = { ExecStart = '' ${cfg.package}/bin/xenconsoled\ - ${optionalString ((cfg.package.version >= "4.8")) " -i"}\ + ${optionalString ((builtins.compareVersions cfg.package.version "4.8" >= 0)) " -i"}\ ${optionalString cfg.trace " --log=all --log-dir=/var/log/xen"} ''; }; |