diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-24 09:00:58 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-24 09:00:58 +0000 |
commit | 744d6a5236154ffd1d180e6840f33a03b278f5b6 (patch) | |
tree | 950b9e3cd767f4528ac7f27b7809a368cf47d34c /usr.sbin/sade | |
parent | 33ee1a22eddb8029d1051a4c04f35b72dcc1e6da (diff) | |
download | FreeBSD-src-744d6a5236154ffd1d180e6840f33a03b278f5b6.zip FreeBSD-src-744d6a5236154ffd1d180e6840f33a03b278f5b6.tar.gz |
Sync to latest ftp-capable sysinstall. We're getting there!
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r-- | usr.sbin/sade/config.c | 59 | ||||
-rw-r--r-- | usr.sbin/sade/devices.c | 85 | ||||
-rw-r--r-- | usr.sbin/sade/install.c | 11 | ||||
-rw-r--r-- | usr.sbin/sade/label.c | 8 | ||||
-rw-r--r-- | usr.sbin/sade/main.c | 5 | ||||
-rw-r--r-- | usr.sbin/sade/menus.c | 42 | ||||
-rw-r--r-- | usr.sbin/sade/msg.c | 3 | ||||
-rw-r--r-- | usr.sbin/sade/sade.h | 36 |
8 files changed, 169 insertions, 80 deletions
diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index c15d364..db73504 100644 --- a/usr.sbin/sade/config.c +++ b/usr.sbin/sade/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.2 1995/05/23 18:06:12 jkh Exp $ + * $Id: config.c,v 1.3 1995/05/24 01:27:08 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -114,7 +114,7 @@ seq_num(Chunk *c1) } void -config_fstab(void) +configFstab(void) { Device **devs; Disk *disk; @@ -183,13 +183,49 @@ config_fstab(void) fclose(fstab); } +/* + * This sucks in /etc/sysconfig, substitutes anything needing substitution, then + * writes it all back out. It's pretty gross and needs re-writing at some point. + */ void -config_sysconfig(void) +configSysconfig(void) { + FILE *fp; + char *lines[5001]; /* Some big number we're not likely to ever reach - I'm being really lazy here, I know */ + char line[256]; + Variable *v; + int i, nlines = 0; + + fp = fopen("/etc/sysconfig", "r"); + if (!fp) { + msgConfirm("Unable to open /etc/sysconfig file! Things may work\nrather strangely as a result of this."); + return; + } + for (i = 0; i < 5000; i++) { + if (!fgets(line, 256, fp)) + break; + lines[nlines++] = strdup(line); + } + lines[nlines] = NULL; + for (v = VarHead; v; v = v->next) { + for (i = 0; i < nlines; i++) { + } + } +} + +int +configSaverTimeout(char *str) +{ + char *val; + + val = msgGetInput("60", "Enter time-out period in seconds for screen saver"); + if (val) + variable_set2("blanktime", val); + return 0; } void -config_resolv(void) +configResolv(void) { static Boolean alreadyDone = FALSE; FILE *fp; @@ -209,19 +245,28 @@ config_resolv(void) } fprintf(fp, "domain\t%s\n", getenv(VAR_DOMAINNAME)); fprintf(fp, "nameserver\t%s\n", getenv(VAR_NAMESERVER)); + msgNotify("Wrote /etc/resolv.conf"); fclose(fp); alreadyDone = TRUE; } int -config_packages(char *str) +configPackages(char *str) { + if (!mediaDevice || mediaDevice->type != DEVICE_TYPE_CDROM) { + if (getpid() == 1) { + if (!mediaSetCDROM(NULL)) + return 0; + else + vsystem("pkg_manage /cdrom"); + } + } + vsystem("pkg_manage"); return 0; } int -config_ports(char *str) +configPorts(char *str) { return 0; } - diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c index a1c501c..1083e14 100644 --- a/usr.sbin/sade/devices.c +++ b/usr.sbin/sade/devices.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: devices.c,v 1.27 1995/05/21 18:24:32 jkh Exp $ + * $Id: devices.c,v 1.28 1995/05/23 02:40:52 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -74,37 +74,38 @@ static struct { char *name; char *description; } device_names[] = { - { DEVICE_TYPE_CDROM, "cd0a", "SCSI CDROM drive" }, - { DEVICE_TYPE_CDROM, "cd1a", "SCSI CDROM drive (2nd unit)" }, - { DEVICE_TYPE_CDROM, "mcd0a", "Mitsumi (old model) CDROM drive" }, - { DEVICE_TYPE_CDROM, "mcd1a", "Mitsumi (old model) CDROM drive (2nd unit)" }, - { DEVICE_TYPE_CDROM, "scd0a", "Sony CDROM drive - CDU31/33A type", }, - { DEVICE_TYPE_CDROM, "scd1a", "Sony CDROM drive - CDU31/33A type (2nd unit)" }, - { DEVICE_TYPE_CDROM, "matcd0a", "Matsushita CDROM ('sound blaster' type)" }, - { DEVICE_TYPE_CDROM, "matcd1a", "Matsushita CDROM (2nd unit)" }, - { DEVICE_TYPE_TAPE, "rst0", "SCSI tape drive" }, - { DEVICE_TYPE_TAPE, "rst1", "SCSI tape drive (2nd unit)" }, - { DEVICE_TYPE_TAPE, "ft0", "Floppy tape drive (QIC-02)" }, - { DEVICE_TYPE_TAPE, "wt0", "Wangtek tape drive" }, - { DEVICE_TYPE_DISK, "sd", "SCSI disk device" }, - { DEVICE_TYPE_DISK, "wd", "IDE/ESDI/MFM/ST506 disk device" }, - { DEVICE_TYPE_FLOPPY, "rfd0", "Floppy disk drive (unit A)" }, - { DEVICE_TYPE_FLOPPY, "rfd1", "Floppy disk drive (unit B)" }, - { DEVICE_TYPE_NETWORK, "cuaa0", "Serial port (COM1) - possible PPP device" }, - { DEVICE_TYPE_NETWORK, "cuaa1", "Serial port (COM2) - possible PPP device" }, - { DEVICE_TYPE_NETWORK, "lp0", "Parallel Port IP (PLIP) using laplink cable" }, - { DEVICE_TYPE_NETWORK, "lo", "Loop-back (local) network interface" }, - { DEVICE_TYPE_NETWORK, "sl", "Serial-line IP (SLIP) interface" }, - { DEVICE_TYPE_NETWORK, "ppp", "Point-to-Point Protocol (PPP) interface" }, - { DEVICE_TYPE_NETWORK, "ed", "WD/SMC 80xx; Novell NE1000/2000; 3Com 3C503 cards" }, - { DEVICE_TYPE_NETWORK, "ep", "3Com 3C509 interface card" }, - { DEVICE_TYPE_NETWORK, "el", "3Com 3C501 interface card" }, - { DEVICE_TYPE_NETWORK, "fe", "Fujitsu MB86960A/MB86965A Ethernet" }, - { DEVICE_TYPE_NETWORK, "ie", "AT&T StarLAN 10 and EN100; 3Com 3C507; NI5210" }, - { DEVICE_TYPE_NETWORK, "le", "DEC EtherWorks 2 and 3" }, - { DEVICE_TYPE_NETWORK, "lnc", "Lance/PCnet cards (Isolan/Novell NE2100/NE32-VL)" }, - { DEVICE_TYPE_NETWORK, "ze", "IBM/National Semiconductor PCMCIA ethernet" }, - { DEVICE_TYPE_NETWORK, "zp", "3Com PCMCIA Etherlink III" }, + { DEVICE_TYPE_CDROM, "cd0a", "SCSI CDROM drive" }, + { DEVICE_TYPE_CDROM, "cd1a", "SCSI CDROM drive (2nd unit)" }, + { DEVICE_TYPE_CDROM, "mcd0a", "Mitsumi (old model) CDROM drive" }, + { DEVICE_TYPE_CDROM, "mcd1a", "Mitsumi (old model) CDROM drive (2nd unit)" }, + { DEVICE_TYPE_CDROM, "scd0a", "Sony CDROM drive - CDU31/33A type", }, + { DEVICE_TYPE_CDROM, "scd1a", "Sony CDROM drive - CDU31/33A type (2nd unit)" }, + { DEVICE_TYPE_CDROM, "matcd0a", "Matsushita CDROM ('sound blaster' type)" }, + { DEVICE_TYPE_CDROM, "matcd1a", "Matsushita CDROM (2nd unit)" }, + { DEVICE_TYPE_TAPE, "rst0", "SCSI tape drive" }, + { DEVICE_TYPE_TAPE, "rst1", "SCSI tape drive (2nd unit)" }, + { DEVICE_TYPE_TAPE, "ft0", "Floppy tape drive (QIC-02)" }, + { DEVICE_TYPE_TAPE, "wt0", "Wangtek tape drive" }, + { DEVICE_TYPE_DISK, "sd", "SCSI disk device" }, + { DEVICE_TYPE_DISK, "wd", "IDE/ESDI/MFM/ST506 disk device" }, + { DEVICE_TYPE_FLOPPY, "rfd0", "Floppy disk drive (unit A)" }, + { DEVICE_TYPE_FLOPPY, "rfd1", "Floppy disk drive (unit B)" }, + { DEVICE_TYPE_NETWORK, "cuaa0", "Serial port (COM1) - possible PPP device" }, + { DEVICE_TYPE_NETWORK, "cuaa1", "Serial port (COM2) - possible PPP device" }, + { DEVICE_TYPE_NETWORK, "lp0", "Parallel Port IP (PLIP) using laplink cable" }, + { DEVICE_TYPE_NETWORK, "lo", "Loop-back (local) network interface" }, + { DEVICE_TYPE_NETWORK, "sl", "Serial-line IP (SLIP) interface" }, + { DEVICE_TYPE_NETWORK, "ppp", "Point-to-Point Protocol (PPP) interface" }, + { DEVICE_TYPE_NETWORK, "ed", "WD/SMC 80xx; Novell NE1000/2000; 3Com 3C503 cards" }, + { DEVICE_TYPE_NETWORK, "ep", "3Com 3C509 interface card" }, + { DEVICE_TYPE_NETWORK, "el", "3Com 3C501 interface card" }, + { DEVICE_TYPE_NETWORK, "fe", "Fujitsu MB86960A/MB86965A Ethernet" }, + { DEVICE_TYPE_NETWORK, "ie", "AT&T StarLAN 10 and EN100; 3Com 3C507; NI5210" }, + { DEVICE_TYPE_NETWORK, "ix", "Intel Etherexpress" }, + { DEVICE_TYPE_NETWORK, "le", "DEC EtherWorks 2 and 3" }, + { DEVICE_TYPE_NETWORK, "lnc", "Lance/PCnet cards (Isolan/Novell NE2100/NE32-VL)" }, + { DEVICE_TYPE_NETWORK, "ze", "IBM/National Semiconductor PCMCIA ethernet" }, + { DEVICE_TYPE_NETWORK, "zp", "3Com PCMCIA Etherlink III" }, { NULL }, }; @@ -144,7 +145,8 @@ deviceDiskFree(Device *dev) /* Register a new device in the devices array */ Device * deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled, - Boolean (*init)(Device *), Boolean (*get)(char *), void (*close)(Device *), void *private) + Boolean (*init)(Device *), int (*get)(char *), Boolean (*close)(Device *, int), + void (*shutdown)(Device *), void *private) { Device *newdev; @@ -158,12 +160,13 @@ deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean e newdev->init = init; newdev->get = get; newdev->close = close; + newdev->shutdown = shutdown; newdev->private = private; Devices[numDevs] = newdev; Devices[++numDevs] = NULL; return newdev; } - + /* Get all device information for devices we have attached */ void deviceGetAll(void) @@ -187,7 +190,7 @@ deviceGetAll(void) msgFatal("Unable to open disk %s", names[i]); (void)deviceRegister(names[i], names[i], d->name, DEVICE_TYPE_DISK, FALSE, - mediaInitUFS, mediaGetUFS, deviceDiskFree, d); + mediaInitUFS, mediaGetUFS, NULL, deviceDiskFree, d); msgDebug("Found a device of type disk named: %s\n", names[i]); } free(names); @@ -206,7 +209,8 @@ deviceGetAll(void) if (fd >= 0) { close(fd); (void)deviceRegister(device_names[i].name, device_names[i].description, strdup(try), - DEVICE_TYPE_CDROM, TRUE, mediaInitCDROM, mediaGetCDROM, mediaCloseCDROM, NULL); + DEVICE_TYPE_CDROM, TRUE, mediaInitCDROM, mediaGetCDROM, NULL, + mediaShutdownCDROM, NULL); msgDebug("Found a device of type CDROM named: %s\n", device_names[i].name); } break; @@ -216,7 +220,7 @@ deviceGetAll(void) if (fd >= 0) { close(fd); deviceRegister(device_names[i].name, device_names[i].description, strdup(try), - DEVICE_TYPE_TAPE, TRUE, mediaInitTape, mediaGetTape, mediaCloseTape, NULL); + DEVICE_TYPE_TAPE, TRUE, mediaInitTape, mediaGetTape, NULL, mediaShutdownTape, NULL); msgDebug("Found a device of type TAPE named: %s\n", device_names[i].name); } break; @@ -226,7 +230,8 @@ deviceGetAll(void) if (fd >= 0) { close(fd); deviceRegister(device_names[i].name, device_names[i].description, strdup(try), - DEVICE_TYPE_FLOPPY, TRUE, mediaInitFloppy, mediaGetFloppy, mediaCloseFloppy, NULL); + DEVICE_TYPE_FLOPPY, TRUE, mediaInitFloppy, mediaGetFloppy, NULL, + mediaShutdownFloppy, NULL); msgDebug("Found a device of type floppy named: %s\n", device_names[i].name); } break; @@ -237,7 +242,7 @@ deviceGetAll(void) close(fd); /* The only network devices that have fds associated are serial ones */ deviceRegister(device_names[i].name, device_names[i].description, strdup(try), - DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, NULL, mediaCloseNetwork, NULL); + DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, NULL, NULL, mediaShutdownNetwork, NULL); msgDebug("Found a device of type network named: %s\n", device_names[i].name); } break; @@ -271,7 +276,7 @@ deviceGetAll(void) || !strncmp(ifptr->ifr_name, "lo0", 3)) continue; deviceRegister(ifptr->ifr_name, ifptr->ifr_name, ifptr->ifr_name, - DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, NULL, mediaCloseNetwork, NULL); + DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, NULL, NULL, mediaShutdownNetwork, NULL); msgDebug("Found a device of type network named: %s\n", ifptr->ifr_name); close(s); if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index 8a0f1fe..8519e5e 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/install.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.49 1995/05/23 18:06:13 jkh Exp $ + * $Id: install.c,v 1.50 1995/05/24 01:27:10 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -208,9 +208,9 @@ installFinal(void) if (alreadyDone) return; - config_fstab(); - config_sysconfig(); - config_resolv(); + configFstab(); + configSysconfig(); + configResolv(); do_final_setup(); alreadyDone = TRUE; SystemWasInstalled = TRUE; @@ -346,7 +346,6 @@ cpio_extract(void) int i, j, zpid, cpid, pfd[2]; Boolean onCDROM = FALSE; -#if 0 if (mediaDevice && mediaDevice->type == DEVICE_TYPE_CDROM) { if (mediaDevice->init) { if ((*mediaDevice->init)(mediaDevice)) { @@ -358,7 +357,7 @@ cpio_extract(void) } } } -#endif + tryagain: while (CpioFD == -1) { msgConfirm("Please Insert CPIO floppy in floppy drive 0"); diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index a06649b..84cd81e 100644 --- a/usr.sbin/sade/label.c +++ b/usr.sbin/sade/label.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: label.c,v 1.21 1995/05/22 14:10:20 jkh Exp $ + * $Id: label.c,v 1.22 1995/05/23 02:41:07 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -560,6 +560,12 @@ diskLabelEditor(char *str) p = get_mountpoint(label_chunk_info[here].c); if (p) { p->newfs = FALSE; + if (label_chunk_info[here].type == PART_FAT + && (!strcmp(p->mountpoint, "/") || !strcmp(p->mountpoint, "/usr") + || !strcmp(p->mountpoint, "/var"))) { + msgConfirm("%s is an invalid mount point for a DOS partition!", p->mountpoint); + strcpy(p->mountpoint, "/bogus"); + } record_label_chunks(); } break; diff --git a/usr.sbin/sade/main.c b/usr.sbin/sade/main.c index dfcf717..e106250 100644 --- a/usr.sbin/sade/main.c +++ b/usr.sbin/sade/main.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated for what's essentially a complete rewrite. * - * $Id: main.c,v 1.7 1995/05/16 11:37:17 jkh Exp $ + * $Id: main.c,v 1.8 1995/05/17 14:39:49 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -64,6 +64,9 @@ main(int argc, char **argv) /* Default to English */ lang_set_English(NULL); + /* Default to passive mode ftp since it's the only thing we currently support :-( */ + variable_set2("ftpPassive", "yes"); + /* Begin user dialog at outer menu */ while (1) { choice = scroll = curr = max = 0; diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c index 6b40740..886f2a1 100644 --- a/usr.sbin/sade/menus.c +++ b/usr.sbin/sade/menus.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: menus.c,v 1.25 1995/05/23 02:41:13 jkh Exp $ + * $Id: menus.c,v 1.26 1995/05/24 01:27:12 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -644,17 +644,43 @@ your FreeBSD system more generally usable and which may be selected\n\ from the menu below. When you're done, select Cancel.", "Press F1 for more information on these options", "configure.hlp", - { { "Time Zone", "Set which time zone you're in", - DMENU_SYSTEM_COMMAND, "tzsetup", 0, 0 }, - { "Add User", "Add users to the system", + { { "Add User", "Add users to the system", DMENU_SYSTEM_COMMAND, "adduser", 0, 0 }, - { "Root Pass", "Set the system manager's password", - DMENU_SYSTEM_COMMAND, "passwd root", 0, 0 }, + { "Time Zone", "Set which time zone you're in", + DMENU_SYSTEM_COMMAND, "tzsetup", 0, 0 }, { "Packages", "Install extra FreeBSD packaged software", - DMENU_CALL, config_packages, 0, 1 }, + DMENU_CALL, configPackages, 0, 1 }, { "Ports", "Enable the FreeBSD Ports Collection from CD", - DMENU_CALL, config_ports, 0, 1 }, + DMENU_CALL, configPorts, 0, 1 }, + { "Root Password", "Set the system manager's password", + DMENU_SYSTEM_COMMAND, "passwd root", 0, 0 }, + { "Screen", "Customize system console behavior", + DMENU_SUBMENU, &MenuSyscons, 0, 0 }, + { "Sysconfig", "Edit the system configuration file (with vi)", + DMENU_SYSTEM_COMMAND, "vi /etc/sysconfig", 0, 0 }, { "XFree86", "Configure XFree86 (if installed)", DMENU_SYSTEM_COMMAND, "PATH=/usr/bin:/bin:/usr/X11R6/bin xf86config", 0, 0 }, { NULL } }, }; + +DMenu MenuSyscons = { + DMENU_NORMAL_TYPE, + "System Console Configuration", + "The default system console driver for FreeBSD (syscons) has a\n\ +number of configuration options which may be set according to\n\ +your preference. When you are done setting configuration options,\n\ +select Cancel.", + NULL, + NULL, + { { "blank", "Screen-blanking saver", + DMENU_SET_VARIABLE, "saver=star", 0, 0 }, + { "Green", "\"green\" power saver (if supported by monitor)", + DMENU_SET_VARIABLE, "saver=snake", 0, 0 }, + { "Snake", "\"snake\" screen saver", + DMENU_SET_VARIABLE, "saver=snake", 0, 0 }, + { "Star", "\"twinkling stars\" screen saver", + DMENU_SET_VARIABLE, "saver=star", 0, 0 }, + { "Timeout", "Set screen saver timeout interval", + DMENU_CALL, configSaverTimeout, 0, 0 }, + { NULL } }, +}; diff --git a/usr.sbin/sade/msg.c b/usr.sbin/sade/msg.c index b2f4baf..a90c50f 100644 --- a/usr.sbin/sade/msg.c +++ b/usr.sbin/sade/msg.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: msg.c,v 1.22 1995/05/22 14:10:25 jkh Exp $ + * $Id: msg.c,v 1.23 1995/05/23 02:41:15 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -100,6 +100,7 @@ msgInfo(char *fmt, ...) attrset(A_REVERSE); mvaddstr(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0, line); attrset(attrs); + move(OnVTY ? VTY_STATLINE : TTY_STATLINE, 79); refresh(); if (OnVTY) { msgDebug("Information: `%s'\n", errstr); diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h index 7e9f83e..b8ea33a 100644 --- a/usr.sbin/sade/sade.h +++ b/usr.sbin/sade/sade.h @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: sysinstall.h,v 1.28 1995/05/23 18:06:16 jkh Exp $ + * $Id: sysinstall.h,v 1.29 1995/05/24 01:27:14 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -159,8 +159,9 @@ typedef struct _device { DeviceType type; Boolean enabled; Boolean (*init)(struct _device *); - Boolean (*get)(char *fname); - void (*close)(struct _device *); + int (*get)(char *fname); + Boolean (*close)(struct _device *, int fd); + void (*shutdown)(struct _device *); void *private; } Device; @@ -216,6 +217,7 @@ extern DMenu MenuMediaFloppy; /* Floppy media menu */ extern DMenu MenuMediaFTP; /* FTP media menu */ extern DMenu MenuMediaTape; /* Tape media menu */ extern DMenu MenuNetworkDevice; /* Network device menu */ +extern DMenu MenuSyscons; /* System console configuration menu */ extern DMenu MenuInstall; /* Installation menu */ extern DMenu MenuInstallType; /* Installation type menu */ extern DMenu MenuDistributions; /* Distribution menu */ @@ -238,11 +240,12 @@ extern void command_shell_add(char *key, char *fmt, ...); extern void command_func_add(char *key, commandFunc func, void *data); /* config.c */ -extern void config_fstab(void); -extern void config_sysconfig(void); -extern void config_resolv(void); -extern int config_ports(char *str); -extern int config_packages(char *str); +extern void configFstab(void); +extern void configSysconfig(void); +extern void configResolv(void); +extern int configPorts(char *str); +extern int configPackages(char *str); +extern int configSaverTimeout(char *str); /* decode.c */ extern DMenuItem *decode(DMenu *menu, char *name); @@ -256,8 +259,9 @@ extern Device **deviceFind(char *name, DeviceType type); extern int deviceCount(Device **devs); extern Device *new_device(char *name); extern Device *deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled, - Boolean (*init)(Device *mediadev), Boolean (*get)(char *distname), - void (*close)(Device *mediadev), void *private); + Boolean (*init)(Device *mediadev), int (*get)(char *distname), + Boolean (*close)(Device *mediadev, int fd), void (*shutDown)(Device *mediadev), + void *private); /* disks.c */ extern int diskPartitionEditor(char *unused); @@ -338,12 +342,12 @@ extern int mediaGetFloppy(char *dist); extern int mediaGetFTP(char *dist); extern int mediaGetTape(char *dist); extern int mediaGetUFS(char *dist); -extern void mediaCloseCDROM(Device *dev); -extern void mediaCloseDOS(Device *dev); -extern void mediaCloseFTP(Device *dev); -extern void mediaCloseFloppy(Device *dev); -extern void mediaCloseNetwork(Device *dev); -extern void mediaCloseTape(Device *dev); +extern void mediaShutdownCDROM(Device *dev); +extern void mediaShutdownDOS(Device *dev); +extern void mediaShutdownFTP(Device *dev); +extern void mediaShutdownFloppy(Device *dev); +extern void mediaShutdownNetwork(Device *dev); +extern void mediaShutdownTape(Device *dev); /* misc.c */ extern Boolean file_readable(char *fname); |