From owner-freebsd-hackers Wed Jun 9 4:49:59 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from titanium.yy.ics.keio.ac.jp (titanium.yy.ics.keio.ac.jp [131.113.47.73]) by hub.freebsd.org (Postfix) with ESMTP id 0BBBB14BD6 for ; Wed, 9 Jun 1999 04:49:55 -0700 (PDT) (envelope-from sanpei@sanpei.org) Received: from lavender.yy.cs.keio.ac.jp (lavender.yy.ics.keio.ac.jp [131.113.47.22]) by titanium.yy.ics.keio.ac.jp (8.8.8+3.0Wbeta13/3.7W) with ESMTP id UAA19396 for ; Wed, 9 Jun 1999 20:49:54 +0900 (JST) Received: (from sanpei@localhost) by lavender.yy.cs.keio.ac.jp (8.9.2/3.7W) id UAA12941; Wed, 9 Jun 1999 20:49:58 +0900 (JST) Message-Id: <199906091149.UAA12941@lavender.yy.cs.keio.ac.jp> To: hackers@FreeBSD.ORG Subject: [sysinstall] save _ftpPath to /etc/rc.conf X-Mailer: Mew version 1.70 on Emacs 19.34.1 / Mule 2.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 09 Jun 1999 20:49:57 +0900 From: MIHIRA Sanpei Yoshiro Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi. Hackers. I always install FreeBSD via FTP. But sysinstall forgot FTP server name after reboot and restart... I quick hacked sysinstall and it save to /etc/rc.conf as below line and reuse URL. # -- sysinstall generated deltas -- # _ftpPath="ftp://ftp.cc.keio.ac.jp/pub/FreeBSD/" Current problem: o _ftpPath is defined in sysinstall.h. I hope to change appropriate strings. (for example remove ``_'' character) o It can't save media type(FTP, NFS, CDROM...). o I hope to reuse to MASTER_SITE_BACKUP for ports system. MIHIRA Sanpei Yoshiro I will add select box to adduser-->Login shell selection box. --- src/release/sysinstall/media.c.org Mon Jun 7 23:03:13 1999 +++ src/release/sysinstall/media.c Wed Jun 9 20:21:09 1999 @@ -322,33 +322,30 @@ cp = variable_get(VAR_FTP_PATH); /* If we've been through here before ... */ if (!variable_get(VAR_NONINTERACTIVE)) - if (networkDev && cp && msgYesNo("Re-use old FTP site selection values?")) + if (cp && msgYesNo("Re-use old FTP site selection values?") && networkDev) cp = NULL; if (!cp) { dialog_clear_norefresh(); if (!dmenuOpenSimple(&MenuMediaFTP, FALSE)) return DITEM_FAILURE | DITEM_RESTORE; - else - cp = variable_get(VAR_FTP_PATH); - what = DITEM_RESTORE; - } - if (!cp) - return DITEM_FAILURE | what; - else if (!strcmp(cp, "other")) { - variable_set2(VAR_FTP_PATH, "ftp://", 0); - dialog_clear_norefresh(); - cp = variable_get_value(VAR_FTP_PATH, "Please specify the URL of a FreeBSD distribution on a\n" + cp = variable_get(VAR_FTP_PATH); + if (!strcmp(cp, "other")) { + variable_set2(VAR_FTP_PATH, "ftp://", 0); + dialog_clear_norefresh(); + cp = variable_get_value(VAR_FTP_PATH, "Please specify the URL of a FreeBSD distribution on a\n" "remote ftp site. This site must accept either anonymous\n" "ftp or you should have set an ftp username and password\n" "in the Options screen.\n\n" "A URL looks like this: ftp:///\n" "Where is relative to the anonymous ftp directory or the\n" "home directory of the user being logged in as.", 0); - if (!cp || !*cp || !strcmp(cp, "ftp://")) { - variable_unset(VAR_FTP_PATH); - return DITEM_FAILURE | what; + if (!cp || !*cp || !strcmp(cp, "ftp://")) { + variable_unset(VAR_FTP_PATH); + return DITEM_FAILURE | DITEM_RESTORE; + } } + variable_set2(VAR_FTP_PATH, cp, 1); } if (strncmp("ftp://", cp, 6)) { msgConfirm("Sorry, %s is an invalid URL!", cp); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message