Convert "maintenance-shell"
svn path=/nixos/branches/fix-style/; revision=14405
This commit is contained in:
parent
4a01e5afc8
commit
f76096bdf9
@ -425,6 +425,7 @@ in
|
||||
(import ../upstart-jobs/swap.nix)
|
||||
(import ../upstart-jobs/network-interfaces.nix)
|
||||
(import ../upstart-jobs/nscd.nix) # Name service cache daemon.
|
||||
(import ../upstart-jobs/maintenance-shell.nix) # Handles the maintenance/stalled event (single-user shell).
|
||||
|
||||
# security
|
||||
(import ../system/sudo.nix)
|
||||
|
@ -71,11 +71,6 @@ let
|
||||
jobs = map makeJob
|
||||
([
|
||||
|
||||
# Handles the maintenance/stalled event (single-user shell).
|
||||
(import ../upstart-jobs/maintenance-shell.nix {
|
||||
inherit (pkgs) bash;
|
||||
})
|
||||
|
||||
# Ctrl-alt-delete action.
|
||||
(import ../upstart-jobs/ctrl-alt-delete.nix)
|
||||
|
||||
|
@ -1,19 +1,24 @@
|
||||
{bash}:
|
||||
{pkgs, config, ...}:
|
||||
|
||||
###### implementation
|
||||
|
||||
{
|
||||
name = "maintenance-shell";
|
||||
|
||||
job = "
|
||||
start on maintenance
|
||||
start on stalled
|
||||
|
||||
script
|
||||
exec < /dev/tty1 > /dev/tty1 2>&1
|
||||
echo \"\"
|
||||
echo \"<<< MAINTENANCE SHELL >>>\"
|
||||
echo \"\"
|
||||
exec ${bash}/bin/sh
|
||||
end script
|
||||
";
|
||||
|
||||
services = {
|
||||
extraJobs = [{
|
||||
name = "maintenance-shell";
|
||||
|
||||
job = ''
|
||||
start on maintenance
|
||||
start on stalled
|
||||
|
||||
script
|
||||
exec < /dev/tty1 > /dev/tty1 2>&1
|
||||
echo \"\"
|
||||
echo \"<<< MAINTENANCE SHELL >>>\"
|
||||
echo \"\"
|
||||
exec ${pkgs.bash}/bin/sh
|
||||
end script
|
||||
'';
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user