* Add an Upstart job for libvirt-guests.

svn path=/nixos/trunk/; revision=26121
This commit is contained in:
Eelco Dolstra 2011-02-25 15:56:49 +00:00
parent 6fd7f8e0e6
commit 08426fb717

View File

@ -59,6 +59,28 @@ in
daemonType = "daemon"; 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";
};
}; };
} }