mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 11:44:07 +00:00
* Add an Upstart job for libvirt-guests.
svn path=/nixos/trunk/; revision=26121
This commit is contained in:
parent
6fd7f8e0e6
commit
08426fb717
@ -59,6 +59,28 @@ in
|
||||
daemonType = "daemon";
|
||||
};
|
||||
|
||||
jobs.libvirt_guests =
|
||||
{ name = "libvirt-guests";
|
||||
|
||||
description = "Job to save/restore libvirtd VMs";
|
||||
|
||||
startOn = "started libvirtd";
|
||||
|
||||
# We want to suspend VMs only on shutdown, but Upstart is broken.
|
||||
#stopOn = "starting shutdown and stopping libvirtd";
|
||||
stopOn = "stopping libvirtd";
|
||||
|
||||
path = [ pkgs.gettext pkgs.libvirt pkgs.gawk ];
|
||||
|
||||
preStart =
|
||||
''
|
||||
mkdir -p /var/lock/subsys -m 755
|
||||
${pkgs.libvirt}/etc/rc.d/init.d/libvirt-guests start
|
||||
'';
|
||||
|
||||
postStop = "${pkgs.libvirt}/etc/rc.d/init.d/libvirt-guests stop";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user