Convert "maintenance-shell"

svn path=/nixos/branches/fix-style/; revision=14405
This commit is contained in:
Marc Weber 2009-03-06 12:27:42 +00:00
parent 4a01e5afc8
commit f76096bdf9
3 changed files with 22 additions and 21 deletions

View File

@ -425,6 +425,7 @@ in
(import ../upstart-jobs/swap.nix) (import ../upstart-jobs/swap.nix)
(import ../upstart-jobs/network-interfaces.nix) (import ../upstart-jobs/network-interfaces.nix)
(import ../upstart-jobs/nscd.nix) # Name service cache daemon. (import ../upstart-jobs/nscd.nix) # Name service cache daemon.
(import ../upstart-jobs/maintenance-shell.nix) # Handles the maintenance/stalled event (single-user shell).
# security # security
(import ../system/sudo.nix) (import ../system/sudo.nix)

View File

@ -71,11 +71,6 @@ let
jobs = map makeJob jobs = map makeJob
([ ([
# Handles the maintenance/stalled event (single-user shell).
(import ../upstart-jobs/maintenance-shell.nix {
inherit (pkgs) bash;
})
# Ctrl-alt-delete action. # Ctrl-alt-delete action.
(import ../upstart-jobs/ctrl-alt-delete.nix) (import ../upstart-jobs/ctrl-alt-delete.nix)

View File

@ -1,9 +1,13 @@
{bash}: {pkgs, config, ...}:
###### implementation
{ {
services = {
extraJobs = [{
name = "maintenance-shell"; name = "maintenance-shell";
job = " job = ''
start on maintenance start on maintenance
start on stalled start on stalled
@ -12,8 +16,9 @@ script
echo \"\" echo \"\"
echo \"<<< MAINTENANCE SHELL >>>\" echo \"<<< MAINTENANCE SHELL >>>\"
echo \"\" echo \"\"
exec ${bash}/bin/sh exec ${pkgs.bash}/bin/sh
end script end script
"; '';
}];
};
} }