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://<hostname>/<path>\n"
                                "Where <path> 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 majord...@freebsd.org
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to