Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.

Commit b07b41c

Browse files
author
Vu Dinh
committed
Bug 1264722: Fix oo-register-dns shows erros with any option
There is a command conflict as '-h' option is linked link both '--help' and '--with-node-hostname' which causes 'getoptlong' object to fail. In fact, '--help' should be linked to '-?' instead. This commit recrifies the issue by linking '--help' back to '-?' as it shows in help message. Bug <1264722> Link <https://bugzilla.redhat.com/show_bug.cgi?id=1264722> Signed-off-by: Vu Dinh <vdinh@redhat.com>
1 parent 3f5d1cb commit b07b41c

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

broker-util/oo-register-dns

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env oo-ruby
22
#--
33
# Copyright 2010 Red Hat, Inc.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,9 +37,9 @@ oo-register-dns --with-node-hostname node1 \\
3737
== List of arguments
3838
-h|--with-node-hostname host Hostname for the node (required)
3939
-n|--with-node-ip ip IP of the node (required)
40-
-d|--domain domain Domain name for this node (optional, default: example.com)
41-
-s|--dns-server server IP address or hostname of DNS server to update (optional, default: 127.0.0.1)
42-
-k|--key-file file Bind key (optional, default: /var/named/<domain name>.key)
40+
-d|--domain domain Domain name for this node (optional, default: example.com)
41+
-s|--dns-server server IP address or hostname of DNS server to update (optional, default: 127.0.0.1)
42+
-k|--key-file file Bind key (optional, default: /var/named/<domain name>.key)
4343
-g|--gss-tsig Use GSS-TSIG Kerberos credentials to bind (optional)
4444
-?|--help Print this message
4545

@@ -54,7 +54,7 @@ opts = GetoptLong.new(
5454
["--dns-server", "-s", GetoptLong::OPTIONAL_ARGUMENT],
5555
["--key-file", "-k", GetoptLong::OPTIONAL_ARGUMENT],
5656
["--gss-tsig", "-g", GetoptLong::NO_ARGUMENT],
57-
["--help", "-h", GetoptLong::NO_ARGUMENT]
57+
["--help", "-?", GetoptLong::NO_ARGUMENT]
5858
)
5959

6060
args = {}

0 commit comments

Comments
 (0)