Hello community, here is the log from the commit of package yast2-samba-client for openSUSE:Factory checked in at 2013-01-20 08:19:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-samba-client (Old) and /work/SRC/openSUSE:Factory/.yast2-samba-client.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-samba-client", Maintainer is "jsuch...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-samba-client/yast2-samba-client.changes 2012-10-16 21:36:59.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-samba-client.new/yast2-samba-client.changes 2013-01-20 08:19:43.000000000 +0100 @@ -1,0 +2,8 @@ +Fri Jan 18 10:35:39 CET 2013 - jsuch...@suse.cz + +- support for CTDB functionality to join AD Domain (fate#312706) +- do not offer stopping services (confusing) +- join with netbios name (if available) also to AD domain +- 2.23.1 + +------------------------------------------------------------------- Old: ---- yast2-samba-client-2.23.0.tar.bz2 New: ---- yast2-samba-client-2.23.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-samba-client.spec ++++++ --- /var/tmp/diff_new_pack.VfVNhR/_old 2013-01-20 08:19:45.000000000 +0100 +++ /var/tmp/diff_new_pack.VfVNhR/_new 2013-01-20 08:19:45.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package yast2-samba-client # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: yast2-samba-client -Version: 2.23.0 +Version: 2.23.1 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-samba-client-2.23.0.tar.bz2 -> yast2-samba-client-2.23.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.0/Makefile.in new/yast2-samba-client-2.23.1/Makefile.in --- old/yast2-samba-client-2.23.0/Makefile.in 2012-10-11 15:28:41.000000000 +0200 +++ new/yast2-samba-client-2.23.1/Makefile.in 2013-01-18 10:43:33.000000000 +0100 @@ -684,7 +684,7 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.0/VERSION new/yast2-samba-client-2.23.1/VERSION --- old/yast2-samba-client-2.23.0/VERSION 2012-10-11 15:29:46.000000000 +0200 +++ new/yast2-samba-client-2.23.1/VERSION 2013-01-18 10:35:22.000000000 +0100 @@ -1 +1 @@ -2.23.0 +2.23.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.0/configure new/yast2-samba-client-2.23.1/configure --- old/yast2-samba-client-2.23.0/configure 2012-10-11 15:28:41.000000000 +0200 +++ new/yast2-samba-client-2.23.1/configure 2013-01-18 10:43:32.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for yast2-samba-client 2.22.2. +# Generated by GNU Autoconf 2.69 for yast2-samba-client 2.23.1. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -579,8 +579,8 @@ # Identity of this package. PACKAGE_NAME='yast2-samba-client' PACKAGE_TARNAME='yast2-samba-client' -PACKAGE_VERSION='2.22.2' -PACKAGE_STRING='yast2-samba-client 2.22.2' +PACKAGE_VERSION='2.23.1' +PACKAGE_STRING='yast2-samba-client 2.23.1' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' PACKAGE_URL='' @@ -1247,7 +1247,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures yast2-samba-client 2.22.2 to adapt to many kinds of systems. +\`configure' configures yast2-samba-client 2.23.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1319,7 +1319,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-samba-client 2.22.2:";; + short | recursive ) echo "Configuration of yast2-samba-client 2.23.1:";; esac cat <<\_ACEOF @@ -1399,7 +1399,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yast2-samba-client configure 2.22.2 +yast2-samba-client configure 2.23.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1416,7 +1416,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yast2-samba-client $as_me 2.22.2, which was +It was created by yast2-samba-client $as_me 2.23.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2355,7 +2355,7 @@ # Define the identity of the package. PACKAGE='yast2-samba-client' - VERSION='2.22.2' + VERSION='2.23.1' cat >>confdefs.h <<_ACEOF @@ -2478,7 +2478,7 @@ -VERSION="2.22.2" +VERSION="2.23.1" RPMNAME="yast2-samba-client" MAINTAINER="Jiri Suchomel <jsuch...@suse.cz>" @@ -3404,7 +3404,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yast2-samba-client $as_me 2.22.2, which was +This file was extended by yast2-samba-client $as_me 2.23.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3457,7 +3457,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -yast2-samba-client config.status 2.22.2 +yast2-samba-client config.status 2.23.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.0/configure.in new/yast2-samba-client-2.23.1/configure.in --- old/yast2-samba-client-2.23.0/configure.in 2012-10-11 15:28:38.000000000 +0200 +++ new/yast2-samba-client-2.23.1/configure.in 2013-01-18 10:43:29.000000000 +0100 @@ -1,9 +1,9 @@ dnl configure.in for yast2-samba-client dnl -dnl -- This file is generated by y2autoconf 2.23.0 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.23.2 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-samba-client, 2.22.2, http://bugs.opensuse.org/, yast2-samba-client) +AC_INIT(yast2-samba-client, 2.23.1, http://bugs.opensuse.org/, yast2-samba-client) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) dnl Important YaST2 variables -VERSION="2.22.2" +VERSION="2.23.1" RPMNAME="yast2-samba-client" MAINTAINER="Jiri Suchomel <jsuch...@suse.cz>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.0/src/Samba.ycp new/yast2-samba-client-2.23.1/src/Samba.ycp --- old/yast2-samba-client-2.23.0/src/Samba.ycp 2012-10-11 15:27:48.000000000 +0200 +++ new/yast2-samba-client-2.23.1/src/Samba.ycp 2013-01-18 10:37:00.000000000 +0100 @@ -733,6 +733,25 @@ } /** + * In cluster environment, + * synchronize nodes after the configuration has been written + */ +global boolean SynchronizeCluster () { + + if (FileUtils::Exists ("/usr/sbin/csync2")) + { + map out = (map) SCR::Execute (.target.bash_output, "/usr/sbin/csync2 -xv"); + if (out["exit"]:0 != 0) + { + y2error ("csync2 failed with %1", out); + return false; + } + return true; + } + return false; +} + +/** * Write all samba-client settings * @return true on success */ @@ -761,6 +780,9 @@ _("Finished") ]; + // rely on ctdb to perform all changes to the samba services for the clustered case + boolean cluster_present = SambaNetJoin::ClusterPresent (false); + if (SambaAD::ADS () != "" && winbind_enabled) { // write progress stage @@ -816,9 +838,11 @@ ret = false; } + SambaNetJoin::CleanupCTDB (); + // winbind Progress::NextStage(); - if (winbind_enabled) { + if (winbind_enabled && !cluster_present) { if (!Package::Installed("samba-winbind") && !Mode::test()) { ret = false; } @@ -832,7 +856,7 @@ Report::Error(_("Cannot start winbind daemon.")); ret = false; } - } else { + } else if (!winbind_enabled) { if (!SambaWinbind::AdjustService(false)) { // translators: error message, do not change winbind Report::Error( _("Cannot stop winbind service.")); @@ -871,7 +895,11 @@ Autologin::Write(write_only); // see dialog.ycp WriteShares (); - AdjustSharesServices (write_only); + + if (!cluster_present) + { + AdjustSharesServices (write_only); + } WriteSSHSupport (ssh_support); @@ -891,6 +919,10 @@ y2warning ("pam-config failed for service %1", service); }); } + if (cluster_present) + { + SynchronizeCluster (); + } // finished Progress::NextStage(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.0/src/SambaAD.pm new/yast2-samba-client-2.23.1/src/SambaAD.pm --- old/yast2-samba-client-2.23.0/src/SambaAD.pm 2012-10-11 15:25:37.000000000 +0200 +++ new/yast2-samba-client-2.23.1/src/SambaAD.pm 2013-01-18 10:37:00.000000000 +0100 @@ -42,6 +42,7 @@ YaST::YCP::Import ("Mode"); YaST::YCP::Import ("SCR"); YaST::YCP::Import ("SambaConfig"); +YaST::YCP::Import ("YaPI::NETWORK"); use constant { TRUE => 1, @@ -55,6 +56,26 @@ # Kerberos realm for AD my $realm = ""; +# remember if machine is DHCP client +my $dhcp_client = undef; + +# Checks if machine is DHCP client +# @param force do force check (otherwise use latest state) +BEGIN{$TYPEINFO{IsDHCPClient}=["function","boolean", "boolean"]} +sub IsDHCPClient { + + my ($self, $force) = @_; + + return $dhcp_client if (defined $dhcp_client) && !$force; + + my $network = YaPI::NETWORK->Read (); + $dhcp_client = FALSE; + foreach my $iface (values %{$network->{"interfaces"}}) { + $dhcp_client = $dhcp_client || (($iface->{"bootproto"} || "") =~ m/^dhcp[46]?$/); + } + return $dhcp_client; +} + # Read the list of available machine accounts in the current domain # # @param domain AD domain diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.0/src/SambaNetJoin.pm new/yast2-samba-client-2.23.1/src/SambaNetJoin.pm --- old/yast2-samba-client-2.23.0/src/SambaNetJoin.pm 2012-10-11 15:25:37.000000000 +0200 +++ new/yast2-samba-client-2.23.1/src/SambaNetJoin.pm 2013-01-18 10:41:41.000000000 +0100 @@ -18,13 +18,198 @@ textdomain "samba-client"; our %TYPEINFO; +YaST::YCP::Import("Package"); YaST::YCP::Import("SCR"); YaST::YCP::Import("SambaConfig"); YaST::YCP::Import("SambaAD"); +YaST::YCP::Import("SambaWinbind"); YaST::YCP::Import("String"); +YaST::YCP::Import("YaPI::NETWORK"); my %TestJoinCache; +use constant { + TRUE => 1, + FALSE => 0, +}; + +# if cluster cleanup is needed at the end +my $cleanup_needed = FALSE; + +my $cluster_present = undef; + +# if DNS should be adapted with AD server +my $adapt_dns = FALSE; + +# name of clone resource +my $clone_id = ""; + + +# Helper function to execute crm binary (internal only, not part of API). +# Takes all arguments in one string. +sub CRMCall { + + my $params = shift; + my $cmd = "/usr/sbin/crm $params"; + + # it would open interactive mode without params + unless ($params) { + y2error ("No parameters to crm provided, exiting..."); + return ""; + } + + my $res = SCR->Execute(".target.bash_output", $cmd); + + y2milestone ("output of '$cmd': ".Dumper($res)); + + return $res->{"stdout"} || ""; +} + +# Check the presence and state of cluster environment +# @param force do force check (otherwise use latest state) +# @return true when cluster is present and configured +BEGIN{$TYPEINFO{ClusterPresent}=[ + "function", "boolean", "boolean"]} +sub ClusterPresent { + + my ($self, $force) = @_; + + return $cluster_present if (defined $cluster_present) && !$force; + + $cluster_present = FALSE; + + if (SambaAD->IsDHCPClient (FALSE)) { + y2warning ("DHCP client found: Not configuring cluster..."); + return FALSE; + } + + # do we have cluster packages installed? + unless (Package->InstalledAll (["ctdb", "crmsh", "pacemaker"])) { + return FALSE; + } + + my $out = SCR->Execute (".target.bash_output", "/usr/sbin/crm_mon -s"); + if ($out->{"exit"} != 0) { + y2milestone ("cluster not configured or not online"); + return FALSE; + } + + # find out the clone resource id, to do later crm operations with + my $show = CRMCall ("configure save -"); + if ($show =~ /primitive (\w+) ocf:heartbeat:CTDB/) { + my $primitive = $1; + if ($show =~ /clone (.+) $primitive/) { + $clone_id = $1; + } + } + + $cluster_present = TRUE; + return TRUE; +} + +# Handle the information if DNS should be adapted ($adapt_dns) +# @param new value - set the new value for $adapt_dns variable +# @return return current value +BEGIN{$TYPEINFO{SetAdaptDNS}=[ + "function", "boolean", "boolean"]} +sub SetAdaptDNS { + + my ($self, $adapt) = @_; + $adapt_dns = $adapt; + return $adapt_dns; +} + +# Edit the file /etc/resolv.conf and set the nameserver to AD server +# Do this only when explicitely for AD configurations and when selected by user +# @return Network adpatation success (the return value of YaPI::NETWORK->Write) +BEGIN{$TYPEINFO{AdaptDNS}=[ + "function", ["map","string","any"]]} +sub AdaptDNS { + + my $server = SambaAD->ADS (); + + return unless ($adapt_dns && $server); + + my $network = YaPI::NETWORK->Read (); + my $nameservers = $network->{"dns"}{"nameservers"} || []; + push @$nameservers, $server; + $network->{"dns"}{"nameservers"} = $nameservers; + + return YaPI::NETWORK->Write({ "dns" => $network->{"dns"} }); +} + + + +# Prepare CTDB (Clustered database for Samba) before joining AD domain (fate#312706) +# The process is documented at +# http://docserv.suse.de/documents/SLE-HA/SLE-ha-guide/single-html/#pro.ha.samba.config.join-ad +# CTDB has to be already configured before calling this function +# +# @param server AD server +# @return boolean true if preparation was successfull, false otherwise (also +BEGIN{$TYPEINFO{PrepareCTDB}=[ + "function", "boolean", "string"]} +sub PrepareCTDB { + + my ($self, $server) = @_; + my $ret = TRUE; + + return FALSE unless $self->ClusterPresent (0); + + # 3. Run crm configure edit and search for the ctdb resource. Add the following line: + # ctdb_manages_winbind="false" + + CRMCall ("resource param ctdb set ctdb_manages_winbind no"); + + # 4. save winbind into /etc/nsswitch.conf + # 5. Restart the NSC daemon: + SambaWinbind->AdjustNsswitch (TRUE, TRUE); + + # 6. Create the Kerberbos configuration file /etc/krb5.conf (the tmp one from Join is enough) + # 7. Cleanup CTDB: + CRMCall ("resource cleanup $clone_id"); + + # 8. Wait until the “unhealty” status disappears. + my $start = time; + my $wait = 60; # 1 minute timeout + + while (time<$start+$wait) { + my $out = SCR->Execute(".target.bash_output", "/usr/bin/ctdb status"); + last if ($out->{"exit"} == 0); + sleep (1); #0.5); + } + + # additional cluster operations will be needed after join + $cleanup_needed = TRUE; + + return $ret; +} + +# Adapt CTDB (Clustered database for Samba) after joining AD domain (fate#312706) +# +BEGIN{$TYPEINFO{CleanupCTDB}=["function", "boolean"]} +sub CleanupCTDB { + + my $self = shift; + + return TRUE unless $cleanup_needed; + + # 10. Change the ctdb_manages_winbind option: + + # a. Stop the ctdb resource: + CRMCall ("resource stop $clone_id"); + + # b. Change the value from false to true: ctdb_manages_winbind="true" + CRMCall ("resource param ctdb set ctdb_manages_winbind yes"); + + # c. Restart the ctdb resource: + CRMCall ("resource start $clone_id"); + + $cleanup_needed = FALSE; + + return TRUE; +} + # Check if this host is a member of a given domain. # # @param domain a name of the domain to check @@ -88,7 +273,12 @@ # bnc#520648 (DHCP may know WINS server address) $include = "\n\tinclude = /etc/samba/dhcp.conf" if (SCR->Read (".sysconfig.network.dhcp.DHCLIENT_MODIFY_SMB_CONF") eq "yes"); + AdaptDNS (); + if ($protocol eq "ads") { + + $self->PrepareCTDB ($server); + my $krb_file = $tmpdir."/krb5.conf"; my $realm = SambaAD->Realm (); my $content = "[global]$include\n\trealm = $realm\n\tsecurity = ADS\n\tworkgroup = $domain\n"; @@ -108,7 +298,9 @@ . ($protocol ne "ads" ? lc($join_level||"") : "") . ($protocol ne "ads" ? " -w '$domain'" : "") . " -s $conf_file" - . (($protocol ne "ads" && $netbios_name)?" -n '$netbios_name'":"") +# . (($protocol ne "ads" && $netbios_name)?" -n '$netbios_name'":"") +# FIXME check if netbios name can be used with AD + . ($netbios_name ? " -n '$netbios_name'" : "") . " -U '" . String->Quote ($user) . "%" . String->Quote ($passwd) . "'"; if ($machine) { @@ -134,11 +326,7 @@ return ($result && $error ne "") ? $error : "unknown error"; } -# Joins the host into a given domain. If user is provided, it will use -# the user and password for joining. If the user is nil, joining will -# be done anonymously. -# -# Attention: It will write the configuration for domain before settings the password +# Leave given domain. # # @param domain a name of a domain to be left # @param user username to be used for joining, or nil for anonymous diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.0/src/dialogs.ycp new/yast2-samba-client-2.23.1/src/dialogs.ycp --- old/yast2-samba-client-2.23.0/src/dialogs.ycp 2012-10-11 15:25:37.000000000 +0200 +++ new/yast2-samba-client-2.23.1/src/dialogs.ycp 2013-01-18 10:35:11.000000000 +0100 @@ -476,7 +476,13 @@ ), `VSpacing (0.2) ) - ) + ), + `Left ( + (SambaAD::ADS () != "" && !SambaAD::IsDHCPClient (false)) ? + // checkbox label + `CheckBox (`id(`adapt_dns),_("Change primary DNS suffix")) : + `VBox () + ) ) ), `VSpacing (0.4), @@ -606,6 +612,11 @@ Samba::SetSSHSupport (use_winbind && (boolean)UI::QueryWidget (`id(`ssh), `Value)); + if (UI::WidgetExists (`adapt_dns)) + { + SambaNetJoin::SetAdaptDNS ((boolean)UI::QueryWidget (`id (`adapt_dns), `Value)); + } + if (Mode::config()) { foreach (string key, [ "user", "password", "machine" ], { @@ -698,8 +709,6 @@ if (!new_share) { max = 0; - if (allow_share) - Samba::stop_services = AskToStopServices (); } Samba::SetShares (max,(string)UI::QueryWidget(`id(`group),`Value)); Samba::SetGuessAccess (new_share && diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.0/src/helps.ycp new/yast2-samba-client-2.23.1/src/helps.ycp --- old/yast2-samba-client-2.23.0/src/helps.ycp 2012-10-11 15:25:37.000000000 +0200 +++ new/yast2-samba-client-2.23.1/src/helps.ycp 2013-01-18 10:35:11.000000000 +0100 @@ -70,6 +70,10 @@ verification of passwords with the NT server or the Kerberos server if joining an AD domain.</p> ")+ + /* Samba role dialog help 2.5/3 */ +_("<p>Check <b>Change primary DNS suffix</b> to add your AD server into the list of name servers. +This option is only available for static network setups.</p>") + + /* Samba role dialog help 3/3 */ _("<p>When you press <b>OK</b>, the system verifies the membership and, if it is a NT or Active Directory domain, allows this host to join the domain.</p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.0/src/routines.ycp new/yast2-samba-client-2.23.1/src/routines.ycp --- old/yast2-samba-client-2.23.0/src/routines.ycp 2012-10-11 15:25:37.000000000 +0200 +++ new/yast2-samba-client-2.23.1/src/routines.ycp 2013-01-18 10:35:11.000000000 +0100 @@ -213,10 +213,18 @@ define symbol JoinDomain(string workgroup) { + string cluster_info = ""; + if (SambaNetJoin::ClusterPresent (false)) + { + // additional information for cluster environment + cluster_info = _("The configuration will be propagated across cluster nodes."); + } + // popup to fill in the domain joining info; %1 is the domain name map<string, string> passwd = passwordUserPopup(sformat(_("Enter the username and the password for joining the domain %1."), workgroup) + "\n\n" - + _("To join the domain anonymously, leave the text entries empty.") + "\n", "Administrator", workgroup, `join); + + _("To join the domain anonymously, leave the text entries empty.\n") + cluster_info, + "Administrator", workgroup, `join); // cancelled the domain joining if( passwd == nil ) return `fail; @@ -252,20 +260,29 @@ if( status == `workgroup || status == `joined_domain ) return `ok; boolean res = false; - + + // popup question, the domain status cannot be found out, ask user what to do + string dont_know = _("Cannot automatically determine if this host\nis a member of the domain %1."); + // popup question, first part + string not_member = _("This host is not a member\nof the domain %1."); + // last part of popup question + string join_q = "\n\n" + sformat (_("Join the domain %1?"), workgroup); + + if (SambaNetJoin::ClusterPresent (false)) + { + dont_know = _("Cannot automatically determine if this cluster\nis a member of the domain %1."); + not_member = _("This cluster is not a member\nof the domain %1."); + } + // allow to join the domain - if( status == `domain ) { - // we don't know the domain status - - // translators: popup question, the domain status cannot be found out, ask user what to do - // %1 is the domain name - res = Popup::YesNo(sformat(_("Cannot automatically determine if this host\nis a member of the domain %1."), workgroup) - + "\n\n" + sformat(_("Join the domain %1?"), workgroup) + "\n"); - } else if( status == `not_joined_domain ) { - // translators: popup question, The workgroup is a domain in fact and the machine is not a member, ask user what to do. - // %1 is the domain name - res = Popup::YesNo(sformat(_("This host is not a member\nof the domain %1."), workgroup) - + "\n\n" + sformat(_("Join the domain %1?"), workgroup) + "\n"); + if (status == `domain) + { + // we don't know the domain status + res = Popup::YesNo (sformat(dont_know, workgroup) + join_q); + } + else if (status == `not_joined_domain) + { + res = Popup::YesNo (sformat(not_member, workgroup) + join_q); } if (!res) { -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org