3
0
Fork 0
forked from mirrors/nixpkgs

* Change all the startOn / stopOn attributes to the Upstart 0.6 syntax

(e.g., startOn = "started foo" instead of startOn = "foo").

svn path=/nixos/branches/upstart-0.6/; revision=18230
This commit is contained in:
Eelco Dolstra 2009-11-06 22:19:17 +00:00
parent 6b0842ff52
commit 83a9bf9a6a
50 changed files with 77 additions and 98 deletions

View file

@ -46,7 +46,7 @@ in
};
jobs.alsa =
{ startOn = "udev";
{ startOn = "started udev";
preStart =
''

View file

@ -66,7 +66,6 @@ in
{ description = "PulseAudio system-wide server";
startOn = "startup";
stopOn = "shutdown";
preStart =
''

View file

@ -75,8 +75,7 @@ in
jobs.mysql =
{ description = "MySQL server";
startOn = "filesystems";
stopOn = "shutdown";
startOn = "started filesystems";
preStart =
''

View file

@ -116,8 +116,7 @@ in
jobs.postgresql =
{ description = "PostgreSQL server";
startOn = "${startDependency}/started";
stopOn = "shutdown";
startOn = "started ${startDependency}";
preStart =
''

View file

@ -79,8 +79,7 @@ in
jobs.acpid =
{ description = "ACPI daemon";
startOn = "udev";
stopOn = "shutdown";
startOn = "started udev";
exec = "${pkgs.acpid}/sbin/acpid --foreground --confdir ${acpiConfDir}";
};

View file

@ -70,7 +70,6 @@ in
# !!! TODO: make sure that HAL starts after acpid,
# otherwise hald-addon-acpi will grab /proc/acpi/event.
startOn = if config.powerManagement.enable then "started acpid" else "started dbus";
stopOn = "shutdown";
environment =
{ # !!! HACK? These environment variables manipulated inside

View file

@ -159,7 +159,6 @@ in
jobs.udev =
{ startOn = "startup";
stopOn = "shutdown";
environment = { UDEV_CONFIG_FILE = conf; };

View file

@ -8,7 +8,6 @@
{ description = "Kernel log daemon";
startOn = "started syslogd";
stopOn = "shutdown";
exec =
"${pkgs.sysklogd}/sbin/klogd -c 1 -2 -n " +

View file

@ -116,7 +116,7 @@ in
jobs.dovecot =
{ description = "Dovecot IMAP/POP3 server";
startOn = "${startingDependency}/started";
startOn = "started ${startingDependency}";
preStart =
''

View file

@ -283,7 +283,7 @@ in
# accurate way is unlikely to be better.
{ description = "Postfix mail server";
startOn = "${startingDependency}/started";
startOn = "started ${startingDependency}";
script =
''

View file

@ -75,8 +75,8 @@ in
jobs.autofs =
{ description = "Filesystem automounter";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
environment =
{ PATH = "${pkgs.nfsUtils}/sbin:${config.system.sbin.modprobe}/sbin";

View file

@ -39,8 +39,7 @@ in
jobs.disnix =
{ description = "Disnix server";
startOn = "dbus";
stopOn = "shutdown";
startOn = "started dbus";
script =
''

View file

@ -88,8 +88,8 @@ in
jobs.gpsd =
{ description = "GPSD daemon";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
exec =
''

View file

@ -78,8 +78,7 @@ in
description = "NixOS manual";
startOn = "udev";
stopOn = "shutdown";
startOn = "started udev";
exec =
''

View file

@ -43,8 +43,7 @@ in
jobs.rogue =
{ description = "Rogue dungeon crawling game";
startOn = "udev";
stopOn = "shutdown";
startOn = "started udev";
extraConfig = "chdir /root";

View file

@ -76,8 +76,8 @@ in
description = "Synergy client";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stopped";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
exec = "${pkgs.synergy}/bin/synergyc ${if cfgS.screenName == "" then "" else "-n ${cfgS.screenName}" }";
};
@ -89,8 +89,8 @@ in
description = "Synergy server";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stopped";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
exec =
''

View file

@ -166,8 +166,8 @@ in
description = "Nagios monitoring daemon";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
preStart =
''

View file

@ -69,8 +69,8 @@ in
description = "Zabbix agent daemon";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
preStart =
''

View file

@ -56,8 +56,8 @@ in
description = "Zabbix server daemon";
startOn = "postgresql";
stopOn = "shutdown";
startOn = "started postgresql";
stopOn = "stopping postgresql";
preStart =
''

View file

@ -81,8 +81,8 @@ in
description = "Kernel NFS server";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
preStart =
''
@ -111,8 +111,8 @@ in
description = "Kernel NFS server";
startOn = "nfs-kernel-exports/started";
stopOn = "nfs-kernel-exports/stop";
startOn = "started nfs-kernel-exports";
stopOn = "stopping nfs-kernel-exports";
exec = "${pkgs.nfsUtils}/sbin/rpc.nfsd ${if cfg.hostName != null then "-H ${cfg.hostName}" else ""} ${builtins.toString cfg.nproc}";
};
@ -122,8 +122,8 @@ in
description = "Kernel NFS server - mount daemon";
startOn = "nfs-kernel-nfsd/started";
stopOn = "nfs-kernel-exports/stop";
startOn = "started nfs-kernel-nfsd";
stopOn = "stopping nfs-kernel-exports";
exec = "${pkgs.nfsUtils}/sbin/rpc.mountd -F -f ${exports}";
};
@ -133,8 +133,8 @@ in
description = "Kernel NFS server - Network Status Monitor";
startOn = "nfs-kernel-nfsd/started";
stopOn = "nfs-kernel-exports/stop";
startOn = "started nfs-kernel-nfsd";
stopOn = "stopping nfs-kernel-exports";
preStart =
''

View file

@ -56,8 +56,8 @@ let
{ name = "samba-${appName}";
description = "Samba Service daemon ${appName}";
startOn = "samba/started";
stopOn = "samba-control/stop";
startOn = "started samba";
stopOn = "stopping samba-control";
exec = "${samba}/sbin/${appName} ${args}";
};
@ -168,8 +168,8 @@ in
{ name = "samba";
description = "Samba server";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
preStart = setupScript;
};

View file

@ -118,8 +118,8 @@ in
jobs.avahi_daemon =
{ name = "avahi-daemon";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
script =
''

View file

@ -67,8 +67,8 @@ in
jobs.bitlbee =
{ description = "BitlBee IRC to other chat networks gateway";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
preStart =
''

View file

@ -114,7 +114,6 @@ in
{ name = "ddclient";
startOn = "startup";
stopOn = "shutdown";
preStart =
''

View file

@ -62,8 +62,8 @@ in
config = mkIf config.networking.useDHCP {
jobs.dhclient =
{ startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
{ startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
preStart =
''

View file

@ -111,8 +111,8 @@ in
jobs.dhcpd =
{ description = "DHCP server";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
script =
''

View file

@ -54,8 +54,8 @@ in
jobs.ejabberd =
{ description = "EJabberd server";
startOn = "network-interface/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interface";
stopOn = "stopping network-interfaces";
preStart =
''

View file

@ -79,7 +79,7 @@ in
environment.systemPackages = [pkgs.iptables];
jobs.firewall =
{ startOn = "network-interfaces/started";
{ startOn = "started network-interfaces";
preStart =
''

View file

@ -194,8 +194,8 @@ in
jobs.gnunetd =
{ description = "The GNUnet Daemon";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
preStart =
''

View file

@ -134,8 +134,8 @@ in
jobs.gw6c =
{ description = "Gateway6 client";
startOn = if cfg.autorun then "network-interfaces/started" else "";
stopOn = "network-interfaces/stop";
startOn = if cfg.autorun then "started network-interfaces" else "";
stopOn = "stopping network-interfaces";
exec = "${gw6cService}/bin/control start";
};

View file

@ -58,8 +58,8 @@ in
jobs.ifplugd =
{ description = "Network interface connectivity monitor";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
exec =
''

View file

@ -122,8 +122,8 @@ in
description = "IRCD Hybrid server";
startOn = "${startingDependency}/started";
stopOn = "${startingDependency}/stop";
startOn = "started ${startingDependency}";
stopOn = "stopping ${startingDependency}";
exec = "${ircdService}/bin/control start";
};

View file

@ -52,8 +52,7 @@ in
jobs.openfire =
{ description = "OpenFire XMPP server";
startOn = "${startDependency}/started";
stopOn = "shutdown";
startOn = "started ${startDependency}";
script =
''

View file

@ -66,8 +66,8 @@ in
jobs.portmap =
{ description = "ONC RPC portmap";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
exec =
''

View file

@ -81,7 +81,6 @@ in
{ name = "privoxy";
startOn = "startup";
stopOn = "shutdown";
preStart =
''

View file

@ -119,8 +119,8 @@ in
jobs.lshd =
{ description = "GNU lshd SSH2 daemon";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
environment =
{ LD_LIBRARY_PATH = config.system.nssModules.path; };

View file

@ -102,8 +102,8 @@ in
jobs.vsftpd =
{ description = "vsftpd server";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
preStart =
''

View file

@ -38,8 +38,8 @@ in
environment.systemPackages = [pkgs.wpa_supplicant];
jobs.wpa_supplicant =
{ startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
{ startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
preStart =
''

View file

@ -122,8 +122,8 @@ in
jobs.xinetd =
{ description = "xinetd server";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
exec = "${xinetd}/sbin/xinetd -syslog daemon -dontfork -stayalive -f ${configFile}";
};

View file

@ -160,8 +160,8 @@ in
jobs.cupsd =
{ description = "CUPS printing daemon";
startOn = "network-interfaces/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
preStart =
''

View file

@ -67,7 +67,6 @@ in
{ description = "at daemon (atd)";
startOn = "startup";
stopOn = "shutdown";
preStart =
''
@ -97,12 +96,12 @@ in
chown atd:atd "$jobdir"/.SEQ && \
chmod 600 "$jobdir"/.SEQ
fi
# `atd' doesn't have a no-fork flag, so start it here. !!!
# Fix this once we have Upstart 0.6.
${at}/sbin/atd
'';
daemonType = "fork";
exec = "${at}/sbin/atd";
postStop =
''
test -e /var/run/atd.pid && kill $(cat /var/run/atd.pid)

View file

@ -70,7 +70,6 @@ in
{ description = "Cron daemon";
startOn = "startup";
stopOn = "shutdown";
# Needed to interpret times in the local timezone.
environment = { TZ = config.time.timeZone; };

View file

@ -101,7 +101,6 @@ in
{ description = "fcron daemon";
startOn = "startup";
stopOn = "shutdown";
environment =
{ PATH = "/var/run/current-system/sw/bin";

View file

@ -21,7 +21,6 @@ in
{ description = "Name Service Cache Daemon";
startOn = "startup";
stopOn = "shutdown";
environment = { LD_LIBRARY_PATH = nssModulesPath; };

View file

@ -53,7 +53,6 @@ in
{ description = "Uptimed daemon";
startOn = "startup";
stopOn = "shutdown";
preStart =
''

View file

@ -41,8 +41,7 @@ in
jobs.gpm =
{ description = "General purpose mouse";
startOn = "udev";
stopOn = "shutdown";
startOn = "started udev";
exec = "${pkgs.gpm}/sbin/gpm -m /dev/input/mice -t ${cfg.protocol} -D &>/dev/null";
};

View file

@ -450,8 +450,7 @@ in
description = "Apache HTTPD";
startOn = "${startingDependency}/started";
stopOn = "shutdown";
startOn = "started ${startingDependency}";
environment =
{ # !!! This should be added in test-instrumentation.nix. It

View file

@ -104,8 +104,8 @@ in
jobs.tomcat =
{ description = "Apache Tomcat server";
startOn = "network-interface/started";
stopOn = "network-interfaces/stop";
startOn = "started network-interface";
stopOn = "stopping network-interfaces";
preStart =
''

View file

@ -43,8 +43,7 @@ in
jobs.xfs =
{ description = "X Font Server";
startOn = "${startingDependency}/started";
stopOn = "shutdown";
startOn = "started ${startingDependency}";
exec = "${pkgs.xorg.xfs}/bin/xfs -config ${configFile}";
};

View file

@ -360,7 +360,7 @@ in
optional (elem "virtualbox" driverNames) kernelPackages.virtualboxGuestAdditions;
jobs.xserver =
{ startOn = if cfg.autorun then "hal" else "never";
{ startOn = if cfg.autorun then "started hal" else "";
environment =
{ FONTCONFIG_FILE = "/etc/fonts/fonts.conf"; # !!! cleanup