omcmd software enables CLI scripting to perform tasks on a functioning ISC DHCP server via OMAPI.
Before using Omcmd, users must first install the dhcp-devel package. Additionally, they will need to check the locations of the include files for DHCP. Installation can be done by simply typing "make" and correcting any errors that show up.
Omcmd has a number of useful features. Users can specify the keyname and secret using the same values as those found in the dhcpd.conf file. The secret is base64 encoded. Alternatively, users can also use a keyfile, where line 1 is the keyname and line 2 is the secret. Additionally, verbose output is possible with the -v flag.
Users can issue one of the four commands, namely, lookup, create, remove, and modify. These commands can be used with either hosts or leases. Arguments are passed as property=value pairs. For example, the first argument of any command should be of the form "ip-address=10.20.30.40."
For remove commands, no other argument is required. For create and modify, additional strings are included containing other supported properties, such as hardware-type, hardware-address, name, and client-hostname. For a more detailed list of supported properties, users can refer to the "man dhcp" page.
When using the lookup command, property names can also be specified. This feature allows users to customize what information is displayed. Properties currently supported by omcmd include ends, tstp, tsfp, cltt, ip-address, client-hostname, name, dhcp-client-identifier, hardware-address, hardware-type, and state.
Omcmd returns a value of 255 when an invalid usage is detected. Otherwise, Omcmd uses a value of the isc_result_t type. Currently, omcmd only supports host and lease objects, but adding support for other known object types should not be difficult.
Version 0.4.8: N/A