portmap: Add options.

Author:    ludo @ rev 14233

svn path=/nixos/branches/fix-style/; revision=14441
This commit is contained in:
Nicolas Pierron 2009-03-07 18:01:17 +00:00
parent c69348cd07
commit 119fff4c4c

@ -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 ""}
'';
}];
};
}