Add the --version command and document it.
[openresolv] / resolvconf.in
index 3ac72f349544e3fd72eb2cc0a596bad49f61cce0..b4439d6ee520178d0d8834f4eb7a530ab9fc1e6c 100644 (file)
@@ -32,6 +32,12 @@ VARDIR=@VARDIR@
 RCDIR=@RCDIR@
 RESTARTCMD=@RESTARTCMD@
 
+if [ "$1" = "--version" ]; then
+       echo "openresolv $OPENRESOLV_VERSION"
+       echo "Copyright (c) 2007-2016 Roy Marples"
+       exit 0
+fi
+
 # Disregard dhcpcd setting
 unset interface_order state_dir
 
@@ -90,6 +96,7 @@ usage()
                           that match the specified pattern
 
          -u               Run updates from our current DNS information
+         --version        Echo the ${RESOLVCONF##*/} version
 
        Options:
          -f               Ignore non existent interfaces