Hello community,

here is the log from the commit of package linuxrc for openSUSE:Factory checked 
in at 2013-12-19 13:34:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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  2013-12-06 
09:43:48.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.linuxrc.new/linuxrc.changes     2013-12-19 
13:34:20.000000000 +0100
@@ -1,0 +2,7 @@
+Thu Dec 19 11:00:57 CET 2013 - snw...@suse.de
+
+- allow linuxrc to be updated (and restarted)
+- Initial changes to use IBM-supplied chzdev command instead of our
+  *_configure commands (fate #316139)
+
+-------------------------------------------------------------------

Old:
----
  linuxrc-4.2.2.tar.bz2

New:
----
  linuxrc-4.2.3.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.QSmF7O/_old  2013-12-19 13:34:20.000000000 +0100
+++ /var/tmp/diff_new_pack.QSmF7O/_new  2013-12-19 13:34:20.000000000 +0100
@@ -25,9 +25,9 @@
 Summary:        SUSE Installation Program
 License:        GPL-3.0+
 Group:          System/Boot
-Version:        4.2.2
+Version:        4.2.3
 Release:        0
-Source:         linuxrc-4.2.2.tar.bz2
+Source:         linuxrc-4.2.3.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description

++++++ linuxrc-4.2.2.tar.bz2 -> linuxrc-4.2.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.2/VERSION new/linuxrc-4.2.3/VERSION
--- old/linuxrc-4.2.2/VERSION   2013-12-05 11:41:19.000000000 +0100
+++ new/linuxrc-4.2.3/VERSION   2013-12-19 11:00:52.000000000 +0100
@@ -1 +1 @@
-4.2.2
+4.2.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.2/changelog new/linuxrc-4.2.3/changelog
--- old/linuxrc-4.2.2/changelog 2013-12-05 11:41:21.000000000 +0100
+++ new/linuxrc-4.2.3/changelog 2013-12-19 11:00:54.000000000 +0100
@@ -1,4 +1,10 @@
-2013-12-05:    HEAD
+2013-12-19:    HEAD
+       - allow linuxrc to be restarted
+       - Merge pull request #4 from openSUSE/fate316139
+       - Initial changes to use IBM-supplied chzdev command instead of our 
*_conf...
+       - Initial changes to use IBM-supplied chzdev command instead of our 
*_configure commands.
+
+2013-12-05:    4.2.2
        - rework linemode (fate #313156)
 
 2013-12-04:    4.2.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.2/checkmedia.c 
new/linuxrc-4.2.3/checkmedia.c
--- old/linuxrc-4.2.2/checkmedia.c      2013-11-29 12:10:09.000000000 +0100
+++ new/linuxrc-4.2.3/checkmedia.c      2013-12-19 10:11:34.000000000 +0100
@@ -76,7 +76,6 @@
 {
   int i;
   char buf[256];
-  hd_t *hd;
 
   iso.err = 1;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.2/file.c new/linuxrc-4.2.3/file.c
--- old/linuxrc-4.2.2/file.c    2013-11-18 14:06:40.000000000 +0100
+++ new/linuxrc-4.2.3/file.c    2013-12-19 10:04:05.000000000 +0100
@@ -303,6 +303,8 @@
   { key_withfcoe,       "WithFCoE",       kf_cfg + kf_cmd                },
   { key_digests,        "Digests",        kf_cfg + kf_cmd + kf_cmd_early },
   { key_plymouth,       "Plymouth",       kf_cfg + kf_cmd_early          },
+  { key_restart,        "Restart",        kf_cfg                         },
+  { key_restarted,      "Restarted",      kf_cfg                         },
 };
 
 static struct {
@@ -1618,6 +1620,14 @@
         if(f->is.numeric) config.plymouth = f->nvalue;
         break;
 
+      case key_restart:
+        if(f->is.numeric && f->nvalue > 0) util_restart();
+        break;
+
+      case key_restarted:
+        if(f->is.numeric) config.restarted = f->nvalue;
+        break;
+
       default:
         break;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.2/file.h new/linuxrc-4.2.3/file.h
--- old/linuxrc-4.2.2/file.h    2013-11-18 14:06:40.000000000 +0100
+++ new/linuxrc-4.2.3/file.h    2013-12-19 10:11:06.000000000 +0100
@@ -52,7 +52,7 @@
   key_ipv6, key_ipv6only, key_usesax2, key_efi, key_supporturl, key_portno,
   key_osahwaddr, key_zen, key_zenconfig, key_udevrule, key_dhcpfail,
   key_namescheme, key_ptoptions, key_is_ptoption, key_withfcoe, key_digests,
-  key_plymouth, key_sslcerts
+  key_plymouth, key_sslcerts, key_restart, key_restarted
 } file_key_t;
 
 typedef enum {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.2/global.h new/linuxrc-4.2.3/global.h
--- old/linuxrc-4.2.2/global.h  2013-12-04 12:05:47.000000000 +0100
+++ new/linuxrc-4.2.3/global.h  2013-12-19 09:42:35.000000000 +0100
@@ -388,6 +388,8 @@
   unsigned early_bash:1;       /* start bash on tty8 */
   unsigned devtmpfs:1;         /* mount devtmpfs */
   unsigned plymouth:1;         /* start plymouth */
+  unsigned restarting:1;       /* we are preparing for restart */
+  unsigned restarted:1;                /* we have been restarted */
   struct {
     unsigned check:1;          /* check for braille displays and start brld if 
found */
     char *dev;                 /* braille device */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.2/linuxrc.c new/linuxrc-4.2.3/linuxrc.c
--- old/linuxrc-4.2.2/linuxrc.c 2013-12-04 14:47:29.000000000 +0100
+++ new/linuxrc-4.2.3/linuxrc.c 2013-12-19 10:47:44.000000000 +0100
@@ -102,7 +102,7 @@
 
 int main(int argc, char **argv, char **env)
 {
-  char *prog;
+  char *prog, *s;
   int err, i, j;
 
   prog = (prog = strrchr(*argv, '/')) ? prog + 1 : *argv;
@@ -149,6 +149,14 @@
     }
   }
 
+  if((s = getenv("restarted")) && !strcmp(s, "42")) {
+    config.restarted = 1;
+    unsetenv("restarted");
+    fprintf(stderr, "\n\nLinuxrc has been restarted\n");
+    printf("\n\nLinuxrc has neem restarted\n");
+    fflush(stdout);
+  }
+
   if(!config.had_segv) config.restart_on_segv = 1;
 
   if(util_check_exist("/usr/src/packages") || getuid()) {
@@ -442,7 +450,7 @@
 {
   util_plymouth_off();
 
-  if(config.netstop) {
+  if(config.netstop || config.restarting) {
     LXRC_WAIT
 
     net_stop();
@@ -478,7 +486,7 @@
   kbd_end(1);
   disp_end();
 
-  lxrc_change_root();
+  if(!config.restarting) lxrc_change_root();
 }
 
 /*
@@ -657,7 +665,13 @@
   signal(SIGINT,  SIG_IGN);
   signal(SIGUSR1, lxrc_usr1);
 
-/*  reboot (RB_DISABLE_CAD); */
+  {
+    struct sigaction sa = { };
+
+    sa.sa_handler = util_restart;
+    sa.sa_flags = SA_NODEFER;
+    sigaction(SIGUSR2, &sa, NULL);
+  }
 
   umask(022);
 
@@ -935,14 +949,14 @@
         mod_modprobe("zfcp","");
         if(util_read_and_chop("/sys/firmware/ipl/device", device, sizeof 
device))
         {
-          sprintf(cmd,"/sbin/zfcp_host_configure %s 1",device);
+          sprintf(cmd,"/sbin/chzdev zfcp %s -i",device);
           fprintf(stderr,"executing %s\n",cmd);
           if(!config.test) system(cmd);
           if(util_read_and_chop("/sys/firmware/ipl/wwpn", wwpn, sizeof wwpn))
           {
             if(util_read_and_chop("/sys/firmware/ipl/lun", lun, sizeof lun))
             {
-              sprintf(cmd,"/sbin/zfcp_disk_configure %s %s %s 
1",device,wwpn,lun);
+              sprintf(cmd,"/sbin/chzdev zfcp %s:%s:%s -i",device,wwpn,lun);
               fprintf(stderr,"executing %s\n",cmd);
               if(!config.test) system(cmd);
             }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.2/net.c new/linuxrc-4.2.3/net.c
--- old/linuxrc-4.2.2/net.c     2013-12-05 11:35:19.000000000 +0100
+++ new/linuxrc-4.2.3/net.c     2013-12-18 09:37:11.000000000 +0100
@@ -2437,25 +2437,27 @@
     case di_390net_escon:
 setup_ctc:
       if(config.hwp.protocol > 0)
-        sprintf(cmd, "ctc_configure %s %s 1 %d", config.hwp.readchan, 
config.hwp.writechan, config.hwp.protocol - 1);
+        sprintf(cmd, "/sbin/chzdev ctc %s:%s -i protocol=%d", 
config.hwp.readchan, config.hwp.writechan, config.hwp.protocol - 1);
       else
-        sprintf(cmd, "ctc_configure %s %s 1", config.hwp.readchan, 
config.hwp.writechan);
+        sprintf(cmd, "/sbin/chzdev ctc %s:%s -i", config.hwp.readchan, 
config.hwp.writechan);
       break;
     case di_390net_hsi:
     case di_390net_osa:
       if (config.hwp.interface == di_osa_lcs)
-        goto setup_ctc;
-      ccmd += sprintf(ccmd, "qeth_configure ");
-      if(config.hwp.portno)
-        ccmd += sprintf(ccmd, "-n %d ", config.hwp.portno - 1);
-      ccmd += sprintf(ccmd, "%s%s%s %s %s %s %s 1",
-        config.hwp.portname ? "-p \"" : "",
-        config.hwp.portname ? config.hwp.portname : "",
-        config.hwp.portname ? "\"" : "",
-        config.hwp.layer2 == 2 ? "-l" : "",
-        config.hwp.readchan,
-        config.hwp.writechan,
-        config.hwp.datachan);
+        sprintf(cmd, "/sbin/chzdev lcs ctc %s:%s -i protocol=0", 
config.hwp.readchan, config.hwp.writechan);
+      else {
+            ccmd += sprintf(ccmd, "/sbin/qeth_configure ");
+            if(config.hwp.portno)
+              ccmd += sprintf(ccmd, "-n %d ", config.hwp.portno - 1);
+            ccmd += sprintf(ccmd, "%s%s%s %s %s %s %s 1",
+            config.hwp.portname ? "-p \"" : "",
+            config.hwp.portname ? config.hwp.portname : "",
+            config.hwp.portname ? "\"" : "",
+            config.hwp.layer2 == 2 ? "-l" : "",
+            config.hwp.readchan,
+            config.hwp.writechan,
+            config.hwp.datachan);
+           }
       break;
     default:
       sprintf(cmd, "unknown s390 network type %d", config.hwp.type);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.2/util.c new/linuxrc-4.2.3/util.c
--- old/linuxrc-4.2.2/util.c    2013-12-03 11:55:07.000000000 +0100
+++ new/linuxrc-4.2.3/util.c    2013-12-19 10:52:48.000000000 +0100
@@ -66,6 +66,8 @@
 #include "url.h"
 #include "linuxrc.h"
 
+extern char **environ;
+
 #define LED_TIME     50000
 
 typedef struct {
@@ -1803,7 +1805,6 @@
     "PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/lbin",
     NULL
   };
-  extern char **environ;
 
   *args = (s = strrchr(shell, '/')) ? s + 1 : shell;
 
@@ -4452,3 +4453,14 @@
 }
 
 
+void util_restart()
+{
+  if(config.restarting || config.restarted) return;
+
+  config.restarting = 1;
+  lxrc_end();
+  setenv("restarted", "42", 1);
+  execve(*config.argv, config.argv, environ);
+}
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-4.2.2/util.h new/linuxrc-4.2.3/util.h
--- old/linuxrc-4.2.2/util.h    2013-12-03 11:41:22.000000000 +0100
+++ new/linuxrc-4.2.3/util.h    2013-12-19 10:03:15.000000000 +0100
@@ -147,4 +147,5 @@
 void util_plymouth_off(void);
 int util_choose_disk_device(char **dev, int type, char *list_title, char 
*input_title);
 
+void util_restart();
 

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to