Hello community, here is the log from the commit of package linuxrc for openSUSE:Factory checked in at 2015-08-10 09:10:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/linuxrc (Old) and /work/SRC/openSUSE:Factory/.linuxrc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "linuxrc" Changes: -------- --- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes 2015-07-27 09:09:01.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.linuxrc.new/linuxrc.changes 2015-08-10 09:10:54.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Jul 28 14:51:12 CEST 2015 - [email protected] + +- add 'sethostname' option to have wicked set the hostname (bsc#934118) +- 5.0.48 + +------------------------------------------------------------------- Old: ---- linuxrc-5.0.47.tar.xz New: ---- linuxrc-5.0.48.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ linuxrc.spec ++++++ --- /var/tmp/diff_new_pack.F9Hay6/_old 2015-08-10 09:10:55.000000000 +0200 +++ /var/tmp/diff_new_pack.F9Hay6/_new 2015-08-10 09:10:55.000000000 +0200 @@ -25,7 +25,7 @@ Summary: SUSE Installation Program License: GPL-3.0+ Group: System/Boot -Version: 5.0.47 +Version: 5.0.48 Release: 0 Source: %{name}-%{version}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ linuxrc-5.0.47.tar.xz -> linuxrc-5.0.48.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.47/VERSION new/linuxrc-5.0.48/VERSION --- old/linuxrc-5.0.47/VERSION 2015-07-22 11:51:06.000000000 +0200 +++ new/linuxrc-5.0.48/VERSION 2015-07-28 14:49:39.000000000 +0200 @@ -1 +1 @@ -5.0.47 +5.0.48 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.47/changelog new/linuxrc-5.0.48/changelog --- old/linuxrc-5.0.47/changelog 2015-07-22 11:51:06.000000000 +0200 +++ new/linuxrc-5.0.48/changelog 2015-07-28 14:49:39.000000000 +0200 @@ -1,3 +1,6 @@ +2015-07-28: 5.0.48 + - add 'sethostname' option to have wicked set the hostname (bsc #934118) + 2015-07-22: 5.0.47 - change company name to SUSE LLC (bsc #938747, fate #319294) - copy modprobe disabling udev rule to the correct place (bsc #938774) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.47/file.c new/linuxrc-5.0.48/file.c --- old/linuxrc-5.0.47/file.c 2015-07-22 11:51:06.000000000 +0200 +++ new/linuxrc-5.0.48/file.c 2015-07-28 14:49:39.000000000 +0200 @@ -306,6 +306,7 @@ { key_nanny, "nanny", kf_cfg + kf_cmd_early }, { key_vlanid, "VLanID", kf_cfg + kf_cmd }, { key_systemboot, "SystemBoot", kf_cfg + kf_cmd }, + { key_sethostname, "SetHostname", kf_cfg + kf_cmd_early }, }; static struct { @@ -1715,6 +1716,10 @@ if(f->is.numeric) config.systemboot = f->nvalue; break; + case key_sethostname: + if(f->is.numeric) config.net.sethostname = f->nvalue; + break; + default: break; } @@ -1839,7 +1844,18 @@ if(config.url.proxy) fprintf(f, "ProxyURL: %s\n", url_print(config.url.proxy, 1)); - if(config.net.realhostname) file_write_str(f, key_hostname, config.net.realhostname); + if(config.net.realhostname) { + file_write_str(f, key_hostname, config.net.realhostname); + } + else { + char buf[256]; + if(!gethostname(buf, sizeof buf)) { + if(config.debug) fprintf(stderr, "hostname = \"%s\"\n", buf); + if(*buf && strcmp(buf, "(none)")) file_write_str(f, key_hostname, buf); + } + } + + LXRC_WAIT file_write_modparms(f); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.47/file.h new/linuxrc-5.0.48/file.h --- old/linuxrc-5.0.47/file.h 2015-07-22 11:51:06.000000000 +0200 +++ new/linuxrc-5.0.48/file.h 2015-07-28 14:49:39.000000000 +0200 @@ -54,7 +54,7 @@ key_namescheme, key_ptoptions, key_is_ptoption, key_withfcoe, key_digests, key_plymouth, key_sslcerts, key_restart, key_restarted, key_autoyast2, key_withipoib, key_upgrade, key_ifcfg, key_defaultinstall, key_nanny, key_vlanid, - key_sshkey, key_systemboot + key_sshkey, key_systemboot, key_sethostname } file_key_t; typedef enum { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.47/global.h new/linuxrc-5.0.48/global.h --- old/linuxrc-5.0.47/global.h 2015-07-22 11:51:06.000000000 +0200 +++ new/linuxrc-5.0.48/global.h 2015-07-28 14:49:39.000000000 +0200 @@ -582,6 +582,7 @@ unsigned ipv4:1; /* do ipv4 config */ unsigned ipv6:1; /* do ipv6 config */ unsigned dhcp_timeout_set:1; /* dhcp_timeout was set explicitly */ + unsigned sethostname:1; /* wicked should set hostname */ unsigned do_setup; /* do network setup */ unsigned setup; /* bitmask: do these network setup things */ char *device; /* currently used device */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.47/net.c new/linuxrc-5.0.48/net.c --- old/linuxrc-5.0.47/net.c 2015-07-22 11:51:06.000000000 +0200 +++ new/linuxrc-5.0.48/net.c 2015-07-28 14:49:39.000000000 +0200 @@ -2290,6 +2290,12 @@ str_copy(&sl2->value, sl->value); } + // set hostname, if requested + if(config.net.sethostname && !slist_getentry(sl_ifcfg, "DHCLIENT_SET_HOSTNAME")) { + sl2 = slist_append_str(&sl_ifcfg, "DHCLIENT_SET_HOSTNAME"); + str_copy(&sl2->value, "yes"); + } + #if defined(__s390__) || defined(__s390x__) // s390 layer2 interfaces if(config.hwp.layer2 == 2 && config.hwp.osahwaddr) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.47/util.c new/linuxrc-5.0.48/util.c --- old/linuxrc-5.0.47/util.c 2015-07-22 11:51:06.000000000 +0200 +++ new/linuxrc-5.0.48/util.c 2015-07-28 14:49:39.000000000 +0200 @@ -1206,6 +1206,7 @@ add_flag(&sl0, buf, config.withfcoe, "fcoe"); add_flag(&sl0, buf, config.withipoib, "ipoib"); add_flag(&sl0, buf, config.upgrade, "upgrade"); + add_flag(&sl0, buf, config.net.sethostname, "hostname"); if(*buf) slist_append_str(&sl0, buf); sprintf(buf, "net_config_mask = 0x%x", net_config_mask());
