diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 2000-09-25 21:57:54 +0000 |
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 2000-09-25 21:57:54 +0000 |
| commit | 2641b0c407077fa8c3032d87d15ac6a103b0ed1b (patch) | |
| tree | 97e7da54e454c6cb23ca18813708e5c453e8de9f /release | |
| parent | 57293fdc2cfdd01d9d5e32d0e5243669d7e006e9 (diff) | |
This commit was manufactured by cvs2svn to create tagrelease/4.1.1
'RELENG_4_1_1_RELEASE'.
Diffstat (limited to 'release')
| -rw-r--r-- | release/picobsd/mfs_tree/etc/login.conf | 62 | ||||
| -rw-r--r-- | release/picobsd/mfs_tree/etc/rc | 31 | ||||
| -rwxr-xr-x | release/picobsd/mfs_tree/stand/update | 39 | ||||
| -rw-r--r-- | release/sysinstall/http.c | 37 | ||||
| -rw-r--r-- | release/sysinstall/installUpgrade.c | 2 | ||||
| -rw-r--r-- | release/sysinstall/media.c | 15 | ||||
| -rw-r--r-- | release/sysinstall/sysinstall.h | 1 |
7 files changed, 40 insertions, 147 deletions
diff --git a/release/picobsd/mfs_tree/etc/login.conf b/release/picobsd/mfs_tree/etc/login.conf deleted file mode 100644 index 60e50f4c03bf..000000000000 --- a/release/picobsd/mfs_tree/etc/login.conf +++ /dev/null @@ -1,62 +0,0 @@ -# $FreeBSD$ - -# Authentication methods - -auth-defaults:\ - :auth=krb_skey_or_passwd,passwd,kerberos,skey: - -auth-root-defaults:\ - :auth-login=krb_skey_or_passwd,passwd,kerberos,skey:\ - :auth-rlogin=krb_or_skey,kerberos,skey: -auth-ftp-defaults:\ - :auth=skey_or_pwd,passwd,skey: -# Example defaults -default:\ - :cputime=infinity:\ - :datasize-cur=22M:\ - :stacksize-cur=8M:\ - :memorylocked-cur=10M:\ - :memoryuse-cur=30M:\ - :filesize=infinity:\ - :coredumpsize=0:\ - :maxproc-cur=64:\ - :openfiles-cur=64:\ - :priority=0:\ - :requirehome@:\ - :umask=022:\ - :tc=auth-defaults: - -# root - fallback for root logins -root:\ - :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\ - :cputime=infinity:\ - :datasize=infinity:\ - :stacksize=infinity:\ - :memorylocked=infinity:\ - :memoryuse=infinity:\ - :filesize=infinity:\ - :coredumpsize=0:\ - :openfiles=infinity:\ - :maxproc=infinity:\ - :memoryuse-cur=32M:\ - :maxproc-cur=64:\ - :openfiles-cur=1024:\ - :priority=0:\ - :requirehome@:\ - :umask=022:\ - :tc=auth-root-defaults: -# Settings used by /etc/rc -daemon:\ - :coredumpsize@:\ - :coredumpsize-cur=0:\ - :datasize=infinity:\ - :datasize-cur@:\ - :maxproc=512:\ - :maxproc-cur@:\ - :memoryuse-cur=64M:\ - :memorylocked-cur=64M:\ - :openfiles=1024:\ - :openfiles-cur@:\ - :stacksize=16M:\ - :stacksize-cur@:\ - :tc=default: diff --git a/release/picobsd/mfs_tree/etc/rc b/release/picobsd/mfs_tree/etc/rc deleted file mode 100644 index c5838cce4d4f..000000000000 --- a/release/picobsd/mfs_tree/etc/rc +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# $FreeBSD$ -# WARNING !!! We overwrite this file during execution with a new rc file. -# Awful things happen if this file's size is > 1024B - -stty status '^T' -trap : 2 -trap : 3 - -HOME=/; export HOME -PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin -export PATH - -trap "echo 'Reboot interrupted'; exit 1" 3 - -### Special setup for one floppy PICOBSD ### -set `df /` ; dev="/dev/$8" -echo "Reading /etc from ${dev}..." -mount -o rdonly ${dev} /mnt -cd /mnt/etc ; cp -Rp . /etc/ -cp -Rp /mnt/root / -cd /etc -#rm files to stop overwrite warning -rm rc login.conf -gzip -d *.gz -pwd_mkdb -p ./master.passwd -umount /mnt -echo "Ok. (Now you can remove ${dev} if you like)" -echo "" -. rc -exit 0 diff --git a/release/picobsd/mfs_tree/stand/update b/release/picobsd/mfs_tree/stand/update deleted file mode 100755 index 16cdfda49543..000000000000 --- a/release/picobsd/mfs_tree/stand/update +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# $FreeBSD$ -# script to edit and save some config file(s) -thefiles=$* -pwd=`pwd` -set `df /` ; dev="/dev/$8" -echo "Updating content on ${dev}: " -mount ${dev} /mnt -if [ "X$?" != "X0" ] ; then - echo "" - echo "Cannot mount ${dev} read-write!" - exit 1 -fi -if [ "$thefiles" = "" ] ; then - srcs=`ls /etc` - for i in $srcs ; do - if [ -f /mnt/etc/$i.gz ] ; then - echo -n "$i ..." - gzip < /etc/$i > /mnt/etc/$i.gz - fi - done -elif [ "$thefiles" = "passwd" ] ; then - ee /etc/master.passwd - pwd_mkdb master.passwd - gzip < /etc/master.passwd /mnt/etc/master.passwd.gz -else - for i in $thefiles; do - if [ -f $i ] ; then - ee $i - gzip < $i > /mnt/$i.gz - fi - done -fi -echo " Done." -echo -n "Updating kernel parameters... " -kget /mnt/boot/kernel.conf -umount /mnt -cd ${pwd} -echo " Done." diff --git a/release/sysinstall/http.c b/release/sysinstall/http.c index 1dfcbf50fcff..dc9d687a2444 100644 --- a/release/sysinstall/http.c +++ b/release/sysinstall/http.c @@ -18,8 +18,8 @@ mediaInitHTTP(Device *dev) */ int rv, s, af; - bool el; /* end of header line */ - char *cp, buf[PATH_MAX], req[BUFSIZ]; + bool el, found=FALSE; /* end of header line */ + char *cp, *rel, buf[PATH_MAX], req[BUFSIZ]; struct addrinfo hints, *res, *res0; af = variable_cmp(VAR_IPV6_ENABLE, "YES") ? AF_INET : AF_UNSPEC; @@ -48,8 +48,23 @@ mediaInitHTTP(Device *dev) variable_get(VAR_HTTP_HOST),variable_get(VAR_HTTP_PORT)); return FALSE; } + /* If the release is specified as "__RELEASE" or "any", then just + * assume that the path the user gave is ok. + */ + rel = variable_get(VAR_RELNAME); + /* + msgConfirm("rel: -%s-", rel); + */ + if (strcmp(rel, "__RELEASE") && strcmp(rel, "any")) { + sprintf(req, "%s/pub/FreeBSD/releases/"MACHINE"/%s", + variable_get(VAR_FTP_PATH), rel); + variable_set2(VAR_HTTP_PATH, req, 0); + } else { + variable_set2(VAR_HTTP_PATH, variable_get(VAR_FTP_PATH), 0); + } - sprintf(req,"GET / HTTP/1.0\r\n\r\n"); + msgNotify("Checking access to\n %s", variable_get(VAR_HTTP_PATH)); + sprintf(req,"HEAD %s/ HTTP/1.0\r\n\r\n", variable_get(VAR_HTTP_PATH)); write(s,req,strlen(req)); /* * scan the headers of the response @@ -63,6 +78,12 @@ mediaInitHTTP(Device *dev) while (rv>0) { if ((*cp == '\012') && el) { /* reached end of a header line */ + if (!strncmp(buf,"HTTP",4)) { + if (strtol((char *)(buf+9),0,0) == 200) { + found = TRUE; + } + } + if (!strncmp(buf,"Server: ",8)) { if (!strncmp(buf,"Server: Squid",13)) { variable_set2(VAR_HTTP_FTP_MODE,";type=i",0); @@ -85,7 +106,10 @@ mediaInitHTTP(Device *dev) } } close(s); - return TRUE; + if (!found) + msgConfirm("No such directory: %s\n" + "please check the URL and try again.", variable_get(VAR_HTTP_PATH)); + return found; } @@ -125,9 +149,8 @@ mediaGetHTTP(Device *dev, char *file, Boolean probe) return NULL; } - sprintf(req,"GET %s/%s/%s%s HTTP/1.0\r\n\r\n", - variable_get(VAR_FTP_PATH), variable_get(VAR_RELNAME), - file, variable_get(VAR_HTTP_FTP_MODE)); + sprintf(req,"GET %s/%s%s HTTP/1.0\r\n\r\n", + variable_get(VAR_HTTP_PATH), file, variable_get(VAR_HTTP_FTP_MODE)); if (isDebug()) { msgDebug("sending http request: %s",req); diff --git a/release/sysinstall/installUpgrade.c b/release/sysinstall/installUpgrade.c index f82bfb7c0db6..cef68c124e69 100644 --- a/release/sysinstall/installUpgrade.c +++ b/release/sysinstall/installUpgrade.c @@ -79,6 +79,7 @@ static HitList etc_files [] = { { JUST_COPY, "gnats", TRUE, NULL }, { JUST_COPY, "group", FALSE, NULL }, { JUST_COPY, "hosts", TRUE, NULL }, + { JUST_COPY, "host.conf", TRUE, NULL }, { JUST_COPY, "hosts.equiv", TRUE, NULL }, { JUST_COPY, "hosts.lpd", TRUE, NULL }, { JUST_COPY, "inetd.conf", TRUE, NULL }, @@ -95,7 +96,6 @@ static HitList etc_files [] = { { JUST_COPY, "namedb", TRUE, NULL }, { JUST_COPY, "networks", TRUE, NULL }, { JUST_COPY, "newsyslog.conf", TRUE, NULL }, - { JUST_COPY, "nsswitch.conf", TRUE, NULL }, { JUST_COPY, "pam.conf", TRUE, NULL }, { JUST_COPY, "passwd", TRUE, NULL }, { JUST_COPY, "periodic", TRUE, NULL }, diff --git a/release/sysinstall/media.c b/release/sysinstall/media.c index 305fb79754a7..91996e14491e 100644 --- a/release/sysinstall/media.c +++ b/release/sysinstall/media.c @@ -50,6 +50,7 @@ #include <resolv.h> static Boolean got_intr = FALSE; +static Boolean ftp_skip_resolve = FALSE; /* timeout handler */ static void @@ -392,7 +393,7 @@ mediaSetFTP(dialogMenuItem *self) msgDebug("dir = `%s'\n", dir ? dir : "/"); msgDebug("port # = `%d'\n", FtpPort); } - if (variable_get(VAR_NAMESERVER)) { + if (!ftp_skip_resolve && variable_get(VAR_NAMESERVER)) { msgNotify("Looking up host %s.", hostname); if (isDebug()) msgDebug("Starting DNS.\n"); @@ -452,22 +453,22 @@ mediaSetFTPPassive(dialogMenuItem *self) int mediaSetHTTP(dialogMenuItem *self) { + Boolean tmp; int result; - char *cp, *idx, hbuf[MAXHOSTNAMELEN], *hostname, *var_hostname; + char *cp, *idx, hbuf[MAXHOSTNAMELEN], *hostname; int HttpPort; int what = DITEM_RESTORE; - var_hostname = variable_get(VAR_NAMESERVER); - variable_unset(VAR_NAMESERVER); + tmp = ftp_skip_resolve; + ftp_skip_resolve = TRUE; result = mediaSetFTP(self); - if (var_hostname) - variable_set2(VAR_NAMESERVER, var_hostname, 0); + ftp_skip_resolve = tmp; if (DITEM_STATUS(result) != DITEM_SUCCESS) return result; - cp = variable_get_value(VAR_HTTP_PATH, + cp = variable_get_value(VAR_HTTP_PROXY, "Please enter the address of the HTTP proxy in this format:\n" " hostname:port (the ':port' is optional, default is 3128)",0); if (!cp) diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h index 5049470806c0..ba9f7b99faca 100644 --- a/release/sysinstall/sysinstall.h +++ b/release/sysinstall/sysinstall.h @@ -112,6 +112,7 @@ #define VAR_FTP_USER "ftpUser" #define VAR_FTP_HOST "ftpHost" #define VAR_HTTP_PATH "_httpPath" +#define VAR_HTTP_PROXY "httpProxy" #define VAR_HTTP_PORT "httpPort" #define VAR_HTTP_HOST "httpHost" #define VAR_HTTP_FTP_MODE "httpFtpMode" |
