forked from mirrors/nixpkgs
* Log the standard output/error of Upstart jobs to
/var/log/upstart/<jobname> rather than spamming the console with it. svn path=/nixos/trunk/; revision=22093
This commit is contained in:
parent
e450e4551f
commit
95a9c5dd77
|
@ -66,7 +66,7 @@ in
|
|||
jobs.atd =
|
||||
{ description = "at daemon (atd)";
|
||||
|
||||
startOn = "startup";
|
||||
startOn = "started udev";
|
||||
|
||||
preStart =
|
||||
''
|
||||
|
|
|
@ -44,7 +44,7 @@ in
|
|||
services.xserver.displayManager.job =
|
||||
{ execCmd =
|
||||
''
|
||||
${pkgs.xorg.xinit}/bin/xinit \
|
||||
exec ${pkgs.xorg.xinit}/bin/xinit \
|
||||
${pkgs.su}/bin/su -c ${dmcfg.session.script} ${cfg.user} \
|
||||
-- ${dmcfg.xserverBin} ${dmcfg.xserverArgs}
|
||||
'';
|
||||
|
|
|
@ -94,7 +94,7 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
|
||||
services.xserver.displayManager.job =
|
||||
{ execCmd = "PATH=${pkgs.grub}/sbin:$PATH ${kdebase_workspace}/bin/kdm -config ${kdmrc}";
|
||||
{ execCmd = "PATH=${pkgs.grub}/sbin:$PATH exec ${kdebase_workspace}/bin/kdm -config ${kdmrc} -nodaemon";
|
||||
logsXsession = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ in
|
|||
{ SLIM_CFGFILE = slimConfig;
|
||||
SLIM_THEMESDIR = slimThemesDir;
|
||||
};
|
||||
execCmd = "${pkgs.slim}/bin/slim";
|
||||
execCmd = "exec ${pkgs.slim}/bin/slim";
|
||||
};
|
||||
|
||||
# Allow null passwords so that the user can login as root on the
|
||||
|
|
|
@ -96,6 +96,7 @@ let
|
|||
fi
|
||||
|
||||
mkdir -m 0755 -p /var/log
|
||||
mkdir -m 0755 -p /var/log/upstart
|
||||
|
||||
touch /var/log/wtmp # must exist
|
||||
chmod 644 /var/log/wtmp
|
||||
|
|
|
@ -95,6 +95,7 @@ mkdir -m 0755 -p /etc/nixos
|
|||
# Miscellaneous boot time cleanup.
|
||||
rm -rf /var/run
|
||||
rm -rf /var/lock
|
||||
rm -rf /var/log/upstart
|
||||
|
||||
#echo -n "cleaning \`/tmp'..."
|
||||
#rm -rf --one-file-system /tmp/*
|
||||
|
|
|
@ -23,13 +23,12 @@ let
|
|||
let
|
||||
|
||||
jobText =
|
||||
let log = "/var/log/upstart/${job.name}"; in
|
||||
''
|
||||
# Upstart job `${job.name}'. This is a generated file. Do not edit.
|
||||
|
||||
description "${job.description}"
|
||||
|
||||
console output
|
||||
|
||||
${if isList job.startOn then
|
||||
"start on ${concatStringsSep " or " job.startOn}"
|
||||
else if job.startOn != "" then
|
||||
|
@ -44,6 +43,7 @@ let
|
|||
|
||||
${optionalString (job.preStart != "") ''
|
||||
pre-start script
|
||||
exec >> ${log} 2>&1
|
||||
${job.preStart}
|
||||
end script
|
||||
''}
|
||||
|
@ -53,18 +53,20 @@ let
|
|||
else if job.script != "" then
|
||||
''
|
||||
script
|
||||
exec >> ${log} 2>&1
|
||||
${job.script}
|
||||
end script
|
||||
''
|
||||
else if job.exec != "" then
|
||||
''
|
||||
exec ${job.exec}
|
||||
exec ${job.exec} >> ${log} 2>&1
|
||||
''
|
||||
else ""
|
||||
}
|
||||
|
||||
${optionalString (job.postStart != "") ''
|
||||
post-start script
|
||||
exec >> ${log} 2>&1
|
||||
${job.postStart}
|
||||
end script
|
||||
''}
|
||||
|
@ -74,12 +76,14 @@ let
|
|||
|
||||
${optionalString (job.preStop != "") ''
|
||||
pre-stop script
|
||||
exec >> ${log} 2>&1
|
||||
${job.preStop}
|
||||
end script
|
||||
''}
|
||||
|
||||
${optionalString (job.postStop != "") ''
|
||||
post-stop script
|
||||
exec >> ${log} 2>&1
|
||||
${job.postStop}
|
||||
end script
|
||||
''}
|
||||
|
|
|
@ -123,7 +123,6 @@ in
|
|||
theme=$(readlink ${themesUnpacked}/$tty)
|
||||
prevTheme=$(${splashutils}/${splashutils.controlName} --tty ''${tty:3} -c getcfg |
|
||||
sed 's/theme: *\(.*\)/\1/;t;d' || true)
|
||||
echo $tty $theme $prevTheme
|
||||
if [ "$theme" != "$prevTheme" ]; then
|
||||
${splashutils}/${splashutils.controlName} --tty ''${tty:3} -c setcfg -t $theme || true
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue