Skip to content

Commit

Permalink
Remove options not implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
juga0 committed Oct 6, 2017
1 parent 5aab244 commit 176113c
Showing 1 changed file with 10 additions and 37 deletions.
47 changes: 10 additions & 37 deletions dhcpcanon/dhcpcanon.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ def main():
parser.add_argument('-v', '--verbose',
help='Set logging level to debug',
action='store_true')
parser.add_argument('-l', '--lease', help='custom lease time',
default=None)
parser.add_argument('--version', action='version',
help='version',
version='%(prog)s ' + __version__)
Expand All @@ -46,42 +44,20 @@ def main():
'-sf', metavar='script-file', nargs='?',
const=SCRIPT_PATH,
help='Path to the network configuration script invoked by '
'dhclient when it gets a lease. If unspecified, the '
'default /sbin/dhcpcanon-script is used. See '
'dhclient-script(8) for a description of this file.')
'dhcpcanon when it gets a lease. Without this option '
'dhcpcanon will configure the network by itself.'
'If unspecified, the '
'default /sbin/dhcpcanon-script is used, which is a copy of'
'dhclient-script(8) for a description of this file.'
'If dhcpcanon is running with NetworkManager, it will'
'be called with the script nm-dhcp-helper.')
parser.add_argument(
'-pf', metavar='pid-file', nargs='?',
const=PID_PATH,
help='Path to the process ID file. If unspecified, the'
'default /var/run/dhclient.pid is used')
parser.add_argument(
'-lf', metavar='lease-file', nargs='?',
const=LEASE_PATH,
help='Path to the lease database file. If unspecified, the'
'default /var/lib/dhcp/dhclient.leases is used. See '
'dhclient.leases(5) for a description of this file.')
parser.add_argument(
'-cf', metavar='config-file', nargs='?',
const=CONF_PATH,
help='Path to the client configuration file. If unspecified,'
'the default /etc/dhcp/dhclient.conf is used. See '
'dhclient.conf(5) for a description of this file.')
parser.add_argument(
'-d',
action='store_true',
help='Force dhclient to run as a foreground process. '
'Normally the DHCP client will run in the foreground '
'until is has configured an interface at which time it '
'will revert to running in the background. This '
'option is useful when running the client under a '
'debugger, or when running it out of inittab on System V'
' systems. This implies -v.')
parser.add_argument('-q',
action='store_true',
help='Be quiet at startup, this is the default.')
parser.add_argument('-N', action='store_true')
parser.add_argument('-6', action='store_true')
parser.add_argument('-4', action='store_true')
'default /var/run/dhcpcanon.pid is used. '
'This option is used by NetworkManager to check whether '
'dhcpcanon is already running.')
args = parser.parse_args()
logger.debug('args %s', args)

Expand All @@ -92,9 +68,6 @@ def main():
if args.verbose:
logger.setLevel(logging.DEBUG)
logger.debug('args %s', args)
if args.lease is not None:
# TODO
pass
if args.interface:
conf.iface = args.interface
logger.debug('interface %s' % conf.iface)
Expand Down

0 comments on commit 176113c

Please sign in to comment.