From 119fff4c4c5f1777c63a2deb739aa45bd0c51548 Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sat, 7 Mar 2009 18:01:17 +0000 Subject: [PATCH] portmap: Add options. Author: ludo @ rev 14233 svn path=/nixos/branches/fix-style/; revision=14441 --- upstart-jobs/portmap.nix | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/upstart-jobs/portmap.nix b/upstart-jobs/portmap.nix index 0c3368545c2b..d09789528200 100644 --- a/upstart-jobs/portmap.nix +++ b/upstart-jobs/portmap.nix @@ -15,6 +15,21 @@ let using the rpcinfo(1) command. ''; }; + + verbose = mkOption { + default = false; + description = '' + Whether to enable verbose output. + ''; + }; + + chroot = mkOption { + default = "/var/empty"; + description = '' + If non-empty, a path to change root to. + ''; + }; + }; }; }; @@ -63,8 +78,12 @@ mkIf config.services.portmap.enable { start on network-interfaces/started stop on network-interfaces/stop - respawn ${portmap}/sbin/portmap - ''; + respawn ${portmap}/sbin/portmap \ + ${if config.services.portmap.chroot == "" + then "" + else "-t \"${config.services.portmap.chroot}\""} \ + ${if config.services.portmap.verbose then "-v" else ""} + ''; }]; }; }