Skip to content

Commit

Permalink
Fix running documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
juga0 committed Jun 26, 2017
1 parent a2dc108 commit 4ba43fe
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ python:
# - '3.5'

before_install:
- sudo apt update && sudo apt install -y python-dev
- sudo apt update && sudo apt install -y python-dev inkscape pylint

install:
- pip install -r requirements_dev.txt
- pip install -U tox coveralls codecov
# && pip install -r dev-requirements.txt"
env:
- TOX_ENV=style
- TOX_ENV=lint
- TOX_ENV=py27,stats
# - TOX_ENV=py35,stats
- TOX_ENV=py35,stats
- TOX_ENV=doc

script:
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Change Log
===========

0.3.0
------

Multiple changes and refactoring.

* Python 3 compatible
* Add tests
* Improve docstrings
* Update documentation and diagrams


v0.1.8.2
---------
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Installation
------------

See [Installation](docs/source/install.rst)
and [Running](docs/source/running.rst)

Download
--------
Expand Down
61 changes: 53 additions & 8 deletions docs/source/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,62 @@
Running dhcpcanon
==================

dhcpca.py [-h] [-d] [-l LEASE] [-v] [interface]
If ``dhcpcanon`` is installed in the system (with the Debian package,
sudo pip install dhcpcanon or sudo python setup.py), run it just invoking::

positional arguments:
interface interface to configure with DHCP
dhcpcanon

optional arguments:
If it's not installed (but a virtualenv has been created),
it can still be run in a virtualenv with:

-h, --help show this help message and exit
source ~/.virtualenv/dhcpcanon/bin/activate
pip install -e .
sudo scripts/dhcpcanon

-d, --debug debug
There is no need to pass any argument, and in that case it will use the
active interface. If there're several active interfaces the behaviour right now
is not predictable.

-l LEASE, --lease custom lease time
An updated command line usage description can be always obtained with::
scripts/dhcpcanon -h

-v, --version version
At the time of writing this the usage documentation is::

usage: dhcpcanon [-h] [-v] [-l LEASE] [--version] [-sf [script-file]]
[-pf [pid-file]] [-lf [lease-file]] [-cf [config-file]] [-d]
[-q] [-N] [-6] [-4]
[interface]

positional arguments:
interface interface to configure with DHCP

optional arguments:
-h, --help show this help message and exit
-v, --verbose Set logging level to debug
-l LEASE, --lease LEASE
custom lease time
--version version
-sf [script-file] Path to the network configuration script invoked by
dhclient when it gets a lease. If unspecified, the
default /sbin/dhclient-script is used. See dhclient-
script(8) for a description of this file.
-pf [pid-file] Path to the process ID file. If unspecified,
thedefault /var/run/dhclient.pid is used
-lf [lease-file] Path to the lease database file. If unspecified,
thedefault /var/lib/dhcp/dhclient.leases is used. See
dhclient.leases(5) for a description of this file.
-cf [config-file] 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.
-d 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.
-q Be quiet at startup, this is the default.
-N
-6
-4
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
extras_require={
'dev': ['ipython', 'pyflakes', 'pep8'],
'test': ['coverage', 'coveralls', 'codecov', 'tox', 'pytest'],
'doc': ['sphinx']
'doc': ['sphinx', 'pylint']
},
# entry_points={
# 'console_scripts': [
Expand Down

0 comments on commit 4ba43fe

Please sign in to comment.