Hello community, here is the log from the commit of package linuxrc checked in at Fri Nov 10 16:10:38 CET 2006. -------- --- linuxrc/linuxrc.changes 2006-11-07 15:33:15.000000000 +0100 +++ /mounts/work_src_done/STABLE/linuxrc/linuxrc.changes 2006-11-10 15:13:14.000000000 +0100 @@ -1,0 +2,5 @@ +Fri Nov 10 15:13:10 CET 2006 - snwint@suse.de + +- read info file via network (#56845) + +------------------------------------------------------------------- Old: ---- linuxrc-2.1.12.tar.bz2 New: ---- linuxrc-2.1.13.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ linuxrc.spec ++++++ --- /var/tmp/diff_new_pack.ZvW1XD/_old 2006-11-10 16:08:37.000000000 +0100 +++ /var/tmp/diff_new_pack.ZvW1XD/_new 2006-11-10 16:08:37.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package linuxrc (Version 2.1.12) +# spec file for package linuxrc (Version 2.1.13) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -16,9 +16,9 @@ Group: System/Boot Autoreqprov: on Summary: SUSE Installation Program -Version: 2.1.12 +Version: 2.1.13 Release: 1 -Source: linuxrc-2.1.12.tar.bz2 +Source: linuxrc-2.1.13.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -53,6 +53,8 @@ %doc linuxrc.html %changelog -n linuxrc +* Fri Nov 10 2006 - snwint@suse.de +- read info file via network (#56845) * Tue Nov 07 2006 - snwint@suse.de - new translations * Mon Nov 06 2006 - snwint@suse.de ++++++ linuxrc-2.1.12.tar.bz2 -> linuxrc-2.1.13.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-2.1.12/Changelog new/linuxrc-2.1.13/Changelog --- old/linuxrc-2.1.12/Changelog 2006-11-07 14:02:12.000000000 +0100 +++ new/linuxrc-2.1.13/Changelog 2006-11-10 15:11:32.000000000 +0100 @@ -1,4 +1,7 @@ -7/11/2007: v2.1.12 +10/11/2006: v2.1.13 + - read info file via network (#56845) + +7/11/2006: v2.1.12 - new translations 6/11/2006: v2.1.11 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-2.1.12/VERSION new/linuxrc-2.1.13/VERSION --- old/linuxrc-2.1.12/VERSION 2006-11-07 14:01:54.000000000 +0100 +++ new/linuxrc-2.1.13/VERSION 2006-11-10 15:10:52.000000000 +0100 @@ -1 +1 @@ -2.1.12 +2.1.13 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-2.1.12/util.c new/linuxrc-2.1.13/util.c --- old/linuxrc-2.1.12/util.c 2006-11-06 17:00:48.000000000 +0100 +++ new/linuxrc-2.1.13/util.c 2006-11-10 15:12:00.000000000 +0100 @@ -4651,14 +4651,15 @@ int get_url(char *src_url, char *dst) { url_t *url; - int err = 1, i, j, win_old, fd_in, fd_out; + int err = 1, i, j, fd_in, fd_out; hd_data_t *hd_data; hd_t *hd; - char *dir = NULL; + char *dir = NULL, *dir2 = NULL, *file; char buf[0x1000]; hd_hw_item_t hw_item; char *dev, *module, *type; instmode_t instmode_save; + inet_t server_save; if(!src_url || !dst) return err; @@ -4768,9 +4769,7 @@ } if(config.net.configured == nc_none) { - if(!(win_old = config.win)) util_disp_init(); net_config(); - if(!win_old) util_disp_done(); } } @@ -4786,30 +4785,117 @@ config.instmode = url->scheme; str_copy(&dir, url->dir ?: ""); - fd_in = net_open(dir); - if(fd_in >= 0) { - fprintf(stderr, "net_open: \"%s\" ok\n", dir); - fd_out = open("/xxx.tmp", O_WRONLY | O_CREAT | O_TRUNC, 0644); - if(fd_out >= 0) { - do { - i = net_read(fd_in, buf, sizeof buf); - j = 0; - if(i > 0) j = write(fd_out, buf, i); - } - while(i > 0 && j > 0); - close(fd_out); - if(!(i < 0 || j < 0)) { - unlink(dst); - rename("/xxx.tmp", dst); - err = 0; + + server_save = config.net.server; + memset(&config.net.server, 0, sizeof config.net.server); + + name2inet(&config.net.server, url->server); + + switch(url->scheme) { + case inst_ftp: + case inst_tftp: + case inst_http: + fd_in = net_open(dir); + if(fd_in >= 0) { + fprintf(stderr, "net_open: \"%s\" ok\n", dir); + fd_out = open("/xxx.tmp", O_WRONLY | O_CREAT | O_TRUNC, 0644); + if(fd_out >= 0) { + do { + i = net_read(fd_in, buf, sizeof buf); + j = 0; + if(i > 0) j = write(fd_out, buf, i); + } + while(i > 0 && j > 0); + close(fd_out); + if(!(i < 0 || j < 0)) { + unlink(dst); + rename("/xxx.tmp", dst); + err = 0; + } + } + net_close(fd_in); } - } - net_close(fd_in); - } - else { - fprintf(stderr, "net_open: \"%s\": %s\n", dir, config.net.error); + else { + fprintf(stderr, "net_open: \"%s\": %s\n", dir, config.net.error); + } + break; + + case inst_nfs: + str_copy(&dir, url->dir); + file = dir ? strrchr(dir, '/') : dir; + if(file && *file == '/') *file++ = 0; + if(file) { + fprintf(stderr, "nfs: trying to mount %s:%s\n", config.net.server.name, dir ?: ""); + i = net_mount_nfs("/mnt", &config.net.server, dir); + if(config.debug) fprintf(stderr, "nfs: err #1 = %d\n", i); + if(!i) { + strprintf(&dir2, "/mnt/%s", file); + + if(util_check_exist(dir2) == 'r') { + char *argv[3]; + + unlink(dst); + argv[1] = dir2; + argv[2] = dst; + util_cp_main(3, argv); + + err = 0; + fprintf(stderr, "nfs: %s::%s: got info file\n", config.net.server.name, url->dir); + } + else { + fprintf(stderr, "nfs: %s::%s: file not found\n", config.net.server.name, url->dir); + } + } + umount("/mnt"); + } + break; + + case inst_smb: + if(url->dir && url->share) { + fprintf(stderr, "smb: trying to mount //%s/%s\n", config.net.server.name, url->share); + i = net_mount_smb("/mnt", &config.net.server, url->share, url->user, url->password, url->domain); + if(!i) { + strprintf(&dir, "/mnt/%s", url->dir); + + if(util_check_exist(dir) == 'r') { + char *argv[3]; + + unlink(dst); + argv[1] = dir; + argv[2] = dst; + util_cp_main(3, argv); + + err = 0; + fprintf(stderr, "smb: %s: got info file\n", url->dir); + } + else { + fprintf(stderr, "smb: %s: file not found\n", url->dir); + } + } + else { + switch(i) { + case -3: + fprintf(stderr, "smb: network setup failed\n"); + break; + + case -2: + fprintf(stderr, "smb: smb/cifs not supported\n"); + break; + + default: /* -1 */ + fprintf(stderr, "smb: mount failed\n"); + } + } + umount("/mnt"); + } + break; + + default: + break; } + config.net.server = server_save; + config.instmode = instmode_save; break; @@ -4822,6 +4908,7 @@ free(hd_data); free(dir); + free(dir2); return err; } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@suse.de