]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
add back in --public-interface as a default
authorAndrew Tridgell <tridge@samba.org>
Mon, 10 Sep 2007 04:26:35 +0000 (14:26 +1000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 10 Sep 2007 04:26:35 +0000 (14:26 +1000)
(This used to be ctdb commit cdf56daf69b2c8381ee673943e982ad20f19affd)

ctdb/server/ctdbd.c

index 218c6582907fca7e196f8bf4e3670bf32cec3c31..500773375eb3731373ff479735c2f244164b1100 100644 (file)
@@ -46,6 +46,7 @@ static struct {
        const char *logfile;
        const char *recovery_lock_file;
        const char *db_dir;
+       const char *public_interface;
        int         no_setsched;
 } options = {
        .nlist = ETCDIR "/ctdb/nodes",
@@ -100,6 +101,7 @@ int main(int argc, const char *argv[])
                POPT_CTDB_CMDLINE
                { "interactive", 'i', POPT_ARG_NONE, &interactive, 0, "don't fork", NULL },
                { "public-addresses", 0, POPT_ARG_STRING, &options.public_address_list, 0, "public address list file", "filename" },
+               { "public-interface", 0, POPT_ARG_STRING, &options.public_interface, 0, "public interface", "interface"},
                { "event-script-dir", 0, POPT_ARG_STRING, &options.event_script_dir, 0, "event script directory", "dirname" },
                { "logfile", 0, POPT_ARG_STRING, &options.logfile, 0, "log file location", "filename" },
                { "nlist", 0, POPT_ARG_STRING, &options.nlist, 0, "node list file", "filename" },
@@ -198,6 +200,11 @@ int main(int argc, const char *argv[])
                }
        }
 
+       if (options.public_interface) {
+               ctdb->default_public_interface = talloc_strdup(ctdb, options.public_interface);
+               CTDB_NO_MEMORY(ctdb, ctdb->default_public_interface);
+       }
+
        if (options.public_address_list) {
                ret = ctdb_set_public_addresses(ctdb, options.public_address_list);
                if (ret == -1) {