mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 21:33:07 +00:00
892d12bccf
* system.nssModules * system.modulesTree * system.sbin.modprobe * system.sbin.mount * nix.envVars - Remove Arguments that can be accessed either by "config" or "pkgs". - Use the new scheme for upstart-jobs/default.nix. This is now a configuration file which is imported by system/options.nix. - Jobs can now include upstart-job/default.nix: * upstrat-jobs/cron.nix * upstart-jobs/dhclient.nix => No Nixos file refers to upstart-jobs/default.nix except if one of its options is require to define an extra job. (e.g.: cron, dhclient) svn path=/nixos/branches/fix-style/; revision=13327
30 lines
580 B
Bash
Executable File
30 lines
580 B
Bash
Executable File
#! /bin/sh -e
|
|
|
|
tmpDir=/tmp/event.d
|
|
|
|
mkdir -p /tmp/event.d
|
|
|
|
if test "$(readlink -f /etc/event.d)" != /tmp/event.d; then
|
|
cp -prd "$(readlink -f /etc/event.d)"/* /tmp/event.d/
|
|
fi
|
|
|
|
for i in $*; do
|
|
echo "building job $i..."
|
|
nix-build /etc/nixos/nixos -A "tests.upstartJobs.$i" -o $tmpDir/.result
|
|
ln -sfn $(readlink -f $tmpDir/.result)/etc/event.d/* /tmp/event.d/
|
|
done
|
|
|
|
ln -sfn /tmp/event.d /etc/event.d
|
|
|
|
echo "restarting init..."
|
|
kill -TERM 1
|
|
|
|
sleep 1
|
|
|
|
for i in $*; do
|
|
echo "restarting job $i..."
|
|
initctl stop "$i"
|
|
sleep 1
|
|
initctl start "$i"
|
|
done
|