mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
portmap: Add options.
Author: ludo @ rev 14233 svn path=/nixos/branches/fix-style/; revision=14441
This commit is contained in:
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 ""}
|
||||
'';
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user