Changeset 224


Ignore:
Timestamp:
Jun 19, 2018, 6:03:33 PM (6 years ago)
Author:
g7moreau
Message:
  • Rename dhcp-dns-tools to ddt
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ddt/ddt

    r221 r224  
    33# Copyright (C) 2006-2018 Gabriel Moreau <Gabriel.Moreau(A)univ-grenoble-alpes.fr>
    44# License GNU GPL version 2 or later and Perl equivalent
     5#
     6# apt-get install perl-base perl-modules libyaml-syck-perl libnet-netmask-perl libreadonly-perl libfile-touch-perl
    57
    68package DDT::RE;
     
    1921use strict;
    2022#use warnings;
    21 use version; our $VERSION = qv('0.9.2');
     23use version; our $VERSION = version->declare('0.9.3');
    2224
    2325use Getopt::Long qw(GetOptions);
     
    27122714      print " -c : comment (mandatory). Example: 2014-04-07 DELL Laptop 6400 - Olivier Toto (INFO)\n";
    27132715      print "Example:\n";
    2714       print " dhcp-dns-tools add_dhcp -h most1mc130 -d legi-661 -i 194.254.66.130 -m 00:17:F2:D3:2B:FF -c '2008-07-03 Mac Book Guillaume Balleyrac (MOST)\n";
    2715       print " dhcp-dns-tools add_dhcp -p pool-stagiaire -i pool -d hmg.priv -m 02:00:54:55:4E:01 -c '2008-09-02 Portable Perso - Laanaia Nabil - Achim Wirth (MEIGE)\n";
     2716      print " ddt add_dhcp -h most1mc130 -d legi-661 -i 194.254.66.130 -m 00:17:F2:D3:2B:FF -c '2008-07-03 Mac Book Guillaume Balleyrac (MOST)\n";
     2717      print " ddt add_dhcp -p pool-stagiaire -i pool -d hmg.priv -m 02:00:54:55:4E:01 -c '2008-09-02 Portable Perso - Laanaia Nabil - Achim Wirth (MEIGE)\n";
    27162718      }
    27172719
     
    27232725      print " -c : comment (mandatory). Example: 2014-04-07 DELL Laptop 6400 - Olivier Toto (INFO)\n";
    27242726      print "Example:\n";
    2725       print " dhcp-dns-tools add_float -p pool-stagiaire -d hmg.priv -i 192.168.10.1 -m 00:AB:1B:CC:AA:2F -c '2013-09-25 Dell OptiPlex 745 - Eric Goncalves (NRJ)\n";
     2727      print " ddt add_float -p pool-stagiaire -d hmg.priv -i 192.168.10.1 -m 00:AB:1B:CC:AA:2F -c '2013-09-25 Dell OptiPlex 745 - Eric Goncalves (NRJ)\n";
    27262728      }
    27272729
     
    27342736      print " -c : comment (mandatory). Example: 2014-04-07 DELL Laptop 6400 - Olivier Toto (INFO)\n";
    27352737      print "Example:\n";
    2736       print " dhcp-dns-tools add_static -h legipc1 -d hmg.priv -i 192.168.10.1 -m 00:AB:1B:CC:AA:2F -c '2013-09-25 Dell OptiPlex 745 - Eric Goncalves (NRJ)\n";
     2738      print " ddt add_static -h legipc1 -d hmg.priv -i 192.168.10.1 -m 00:AB:1B:CC:AA:2F -c '2013-09-25 Dell OptiPlex 745 - Eric Goncalves (NRJ)\n";
    27372739      }
    27382740
     
    27442746      print " -c : comment (mandatory). Example: 2014-04-07 DELL Laptop 6400 - Olivier Toto (INFO)\n";
    27452747      print "Example:\n";
    2746       print " dhcp-dns-tools add_virtual -h legipc1 -d legi-211 -i 192.168.10.1 -c '2013-09-25 Dell OptiPlex 745 - Eric Goncalves (NRJ)\n";
     2748      print " ddt add_virtual -h legipc1 -d legi-211 -i 192.168.10.1 -c '2013-09-25 Dell OptiPlex 745 - Eric Goncalves (NRJ)\n";
    27472749      }
    27482750
     
    27602762      print " -c : comment (mandatory). Example: 2016-08-22 VLAN legi-261 (INFO)\n";
    27612763      print "Examples:\n";
    2762       print " dhcp-dns-tools create_domainset -d legi-264 -e legi.grenoble-inp.fr -c '2016-08-22 VLAN legi-261 (INFO)'\n";
     2764      print " ddt create_domainset -d legi-264 -e legi.grenoble-inp.fr -c '2016-08-22 VLAN legi-261 (INFO)'\n";
    27632765      }
    27642766
     
    27702772      print " -i : adresse(s) IP ou plage d'IP. Séparateur d'adresses IP: ','. Séparateur de plage '-'\n";
    27712773      print "Examples:\n";
    2772       print " dhcp-dns-tools -p pool-hmg -d hmg.priv -f pool.hmg.priv -i 192.168.10.1,192.168.10.2,192.168.10.3\n";
    2773       print " dhcp-dns-tools -p turbocavit -d legi-sector03 -f pool-legi-public -i 192.168.10.1-192.168.10.4\n";
     2774      print " ddt -p pool-hmg -d hmg.priv -f pool.hmg.priv -i 192.168.10.1,192.168.10.2,192.168.10.3\n";
     2775      print " ddt -p turbocavit -d legi-sector03 -f pool-legi-public -i 192.168.10.1-192.168.10.4\n";
    27742776      }
    27752777
     
    28732875      print " -d : domain set attachment (mandatory if option -h)\n";
    28742876      print "Examples:\n";
    2875       print " dhcp-dns-tools enable_pc -i 192.168.10.1\n";
    2876       print " dhcp-dns-tools enable_pc -d hmg.priv -h kevinpc\n";
     2877      print " ddt enable_pc -i 192.168.10.1\n";
     2878      print " ddt enable_pc -d hmg.priv -h kevinpc\n";
    28772879      }
    28782880
     
    28952897      print " -d : domain set attachment (mandatory if option -h)\n";
    28962898      print "Examples:\n";
    2897       print " dhcp-dns-tools disable_pc -i 192.168.10.1\n";
    2898       print " dhcp-dns-tools disable_pc -d hmg.priv -h kevinpc\n";
     2899      print " ddt disable_pc -i 192.168.10.1\n";
     2900      print " ddt disable_pc -d hmg.priv -h kevinpc\n";
    28992901      }
    29002902
     
    29282930
    29292931   print <<'END';
    2930 dhcp-dns-tools - management of computer names and IP addresses
     2932ddt - management of computer names and IP addresses
    29312933Copyright (C) 2006-2018 Gabriel Moreau <Gabriel.Moreau(A)univ-grenoble-alpes.fr>
    29322934License GNU GPL version 2 or later and Perl equivalent
     
    29442946sub cmd_help {
    29452947   print <<END;
    2946 dhcp-dns-tools - management of computer names and IP addresses
    2947 
    2948  dhcp-dns-tools add-alias [--hostname|-h hostname] [--domainset|-d domainset] [--alias|-a alias]
    2949  dhcp-dns-tools add-dhcp [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment]
    2950  dhcp-dns-tools add-float [--pool|-p pool] [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment]
    2951  dhcp-dns-tools add-static [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment]
    2952  dhcp-dns-tools add-virtual [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--comment|-c comment]
    2953  dhcp-dns-tools change-comment [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment]
    2954  dhcp-dns-tools change-domainset [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac]
    2955  dhcp-dns-tools change-host [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
    2956  dhcp-dns-tools change-ip [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
    2957  dhcp-dns-tools change-mac [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac]
    2958  dhcp-dns-tools change-tag [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--tag|-t tag]
    2959  dhcp-dns-tools check-dns
    2960  dhcp-dns-tools create-domainset [--domainset|-d domainset] [--dns-extension|-e dns_extension] [--comment|-c comment]
    2961  dhcp-dns-tools create-pool [--pool|-p pool] [--domainset|-d domainset] [--file-pool|-f file_pool] [--ipaddress-pool|-i ipaddress_pool]
    2962  dhcp-dns-tools create-pxe [--bootp|-b pxe_config] [--next-server|-n next_server] [--filename|-f filename] [--comment|-c comment]
    2963  dhcp-dns-tools create-tag [--tag|-t tag] [--comment|-c comment]
    2964  dhcp-dns-tools del-float [--pool|-p pool] [--mac|-m mac]
    2965  dhcp-dns-tools del-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
    2966  dhcp-dns-tools disable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
    2967  dhcp-dns-tools disable-float [--pool|-p pool] [--mac|-m mac]
    2968  dhcp-dns-tools disable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
    2969  dhcp-dns-tools enable-float [--pool|-p pool] [--mac|-m mac]
    2970  dhcp-dns-tools enable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
    2971  dhcp-dns-tools enable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--bootp|-b pxe_config]
    2972  dhcp-dns-tools gen-dhcp-file
    2973  dhcp-dns-tools gen-dns-file
    2974  dhcp-dns-tools help
    2975  dhcp-dns-tools load-database [--domainset|-d domainset] [--filename|-f filename] [--kind|-k kind]
    2976  dhcp-dns-tools remove-pxe [--bootp|-b pxe_config]
    2977  dhcp-dns-tools remove-tag [--tag|-t tag]
    2978  dhcp-dns-tools search-mac [--mac|-m mac]
    2979  dhcp-dns-tools show-domainset
    2980  dhcp-dns-tools show
    2981  dhcp-dns-tools show-pool [--no-header|-H]
    2982  dhcp-dns-tools show-pxe [--no-header|-H]
    2983  dhcp-dns-tools show-tag [--no-header|-H]
    2984  dhcp-dns-tools version
     2948ddt - management of computer names and IP addresses
     2949
     2950 ddt add-alias [--hostname|-h hostname] [--domainset|-d domainset] [--alias|-a alias]
     2951 ddt add-dhcp [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment]
     2952 ddt add-float [--pool|-p pool] [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment]
     2953 ddt add-static [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment]
     2954 ddt add-virtual [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--comment|-c comment]
     2955 ddt change-comment [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment]
     2956 ddt change-domainset [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac]
     2957 ddt change-host [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
     2958 ddt change-ip [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
     2959 ddt change-mac [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac]
     2960 ddt change-tag [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--tag|-t tag]
     2961 ddt check-dns
     2962 ddt create-domainset [--domainset|-d domainset] [--dns-extension|-e dns_extension] [--comment|-c comment]
     2963 ddt create-pool [--pool|-p pool] [--domainset|-d domainset] [--file-pool|-f file_pool] [--ipaddress-pool|-i ipaddress_pool]
     2964 ddt create-pxe [--bootp|-b pxe_config] [--next-server|-n next_server] [--filename|-f filename] [--comment|-c comment]
     2965 ddt create-tag [--tag|-t tag] [--comment|-c comment]
     2966 ddt del-float [--pool|-p pool] [--mac|-m mac]
     2967 ddt del-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
     2968 ddt disable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
     2969 ddt disable-float [--pool|-p pool] [--mac|-m mac]
     2970 ddt disable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
     2971 ddt enable-float [--pool|-p pool] [--mac|-m mac]
     2972 ddt enable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
     2973 ddt enable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--bootp|-b pxe_config]
     2974 ddt gen-dhcp-file
     2975 ddt gen-dns-file
     2976 ddt help
     2977 ddt load-database [--domainset|-d domainset] [--filename|-f filename] [--kind|-k kind]
     2978 ddt remove-pxe [--bootp|-b pxe_config]
     2979 ddt remove-tag [--tag|-t tag]
     2980 ddt search-mac [--mac|-m mac]
     2981 ddt show-domainset
     2982 ddt show
     2983 ddt show-pool [--no-header|-H]
     2984 ddt show-pxe [--no-header|-H]
     2985 ddt show-tag [--no-header|-H]
     2986 ddt version
    29852987
    29862988COMMANDS
     
    30353037=head1 NAME
    30363038
    3037 dhcp-dns-tools - management of computer names and IP addresses
     3039ddt - management of computer names and IP addresses
    30383040
    30393041=head1 USAGE
    30403042
    3041  dhcp-dns-tools add-alias [--hostname|-h hostname] [--domainset|-d domainset] [--alias|-a alias]
    3042  dhcp-dns-tools add-dhcp [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment]
    3043  dhcp-dns-tools add-float [--pool|-p pool] [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment]
    3044  dhcp-dns-tools add-static [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment]
    3045  dhcp-dns-tools add-virtual [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--comment|-c comment]
    3046  dhcp-dns-tools change-comment [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment]
    3047  dhcp-dns-tools change-domainset [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac]
    3048  dhcp-dns-tools change-host [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
    3049  dhcp-dns-tools change-ip [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
    3050  dhcp-dns-tools change-mac [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac]
    3051  dhcp-dns-tools change-tag [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--tag|-t tag]
    3052  dhcp-dns-tools check-dns
    3053  dhcp-dns-tools create-domainset [--domainset|-d domainset] [--dns-extension|-e dns_extension] [--comment|-c comment]
    3054  dhcp-dns-tools create-pool [--pool|-p pool] [--domainset|-d domainset] [--file-pool|-f file_pool] [--ipaddress-pool|-i ipaddress_pool]
    3055  dhcp-dns-tools create-pxe [--bootp|-b pxe_config] [--next-server|-n next_server] [--filename|-f filename] [--comment|-c comment]
    3056  dhcp-dns-tools create-tag [--tag|-t tag] [--comment|-c comment]
    3057  dhcp-dns-tools del-float [--pool|-p pool] [--mac|-m mac]
    3058  dhcp-dns-tools del-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
    3059  dhcp-dns-tools disable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
    3060  dhcp-dns-tools disable-float [--pool|-p pool] [--mac|-m mac]
    3061  dhcp-dns-tools disable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
    3062  dhcp-dns-tools enable-float [--pool|-p pool] [--mac|-m mac]
    3063  dhcp-dns-tools enable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
    3064  dhcp-dns-tools enable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--bootp|-b pxe_config]
    3065  dhcp-dns-tools gen-dhcp-file
    3066  dhcp-dns-tools gen-dns-file
    3067  dhcp-dns-tools help
    3068  dhcp-dns-tools load-database [--domainset|-d domainset] [--filename|-f filename] [--kind|-k kind]
    3069  dhcp-dns-tools remove-pxe [--bootp|-b pxe_config]
    3070  dhcp-dns-tools remove-tag [--tag|-t tag]
    3071  dhcp-dns-tools search-mac [--mac|-m mac]
    3072  dhcp-dns-tools show-domainset
    3073  dhcp-dns-tools show
    3074  dhcp-dns-tools show-pool [--no-header|-H]
    3075  dhcp-dns-tools show-pxe [--no-header|-H]
    3076  dhcp-dns-tools show-tag [--no-header|-H]
    3077  dhcp-dns-tools version
     3043 ddt add-alias [--hostname|-h hostname] [--domainset|-d domainset] [--alias|-a alias]
     3044 ddt add-dhcp [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment]
     3045 ddt add-float [--pool|-p pool] [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment]
     3046 ddt add-static [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--comment|-c comment]
     3047 ddt add-virtual [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--comment|-c comment]
     3048 ddt change-comment [--domainset|-d domainset] [--mac|-m mac] [--comment|-c comment]
     3049 ddt change-domainset [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac]
     3050 ddt change-host [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
     3051 ddt change-ip [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
     3052 ddt change-mac [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac]
     3053 ddt change-tag [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--mac|-m mac] [--tag|-t tag]
     3054 ddt check-dns
     3055 ddt create-domainset [--domainset|-d domainset] [--dns-extension|-e dns_extension] [--comment|-c comment]
     3056 ddt create-pool [--pool|-p pool] [--domainset|-d domainset] [--file-pool|-f file_pool] [--ipaddress-pool|-i ipaddress_pool]
     3057 ddt create-pxe [--bootp|-b pxe_config] [--next-server|-n next_server] [--filename|-f filename] [--comment|-c comment]
     3058 ddt create-tag [--tag|-t tag] [--comment|-c comment]
     3059 ddt del-float [--pool|-p pool] [--mac|-m mac]
     3060 ddt del-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
     3061 ddt disable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
     3062 ddt disable-float [--pool|-p pool] [--mac|-m mac]
     3063 ddt disable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
     3064 ddt enable-float [--pool|-p pool] [--mac|-m mac]
     3065 ddt enable-pc [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip]
     3066 ddt enable-pxe [--hostname|-h hostname] [--domainset|-d domainset] [--ip|-i ip] [--bootp|-b pxe_config]
     3067 ddt gen-dhcp-file
     3068 ddt gen-dns-file
     3069 ddt help
     3070 ddt load-database [--domainset|-d domainset] [--filename|-f filename] [--kind|-k kind]
     3071 ddt remove-pxe [--bootp|-b pxe_config]
     3072 ddt remove-tag [--tag|-t tag]
     3073 ddt search-mac [--mac|-m mac]
     3074 ddt show-domainset
     3075 ddt show
     3076 ddt show-pool [--no-header|-H]
     3077 ddt show-pxe [--no-header|-H]
     3078 ddt show-tag [--no-header|-H]
     3079 ddt version
    30783080
    30793081=head1 COMMANDS
Note: See TracChangeset for help on using the changeset viewer.