2001-04-15 15:08:51 +04:00
|
|
|
/* $NetBSD: defs.h,v 1.66 2001/04/15 11:08:51 itojun Exp $ */
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright 1997 Piermont Information Systems Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Written by Philip A. Nelson for Piermont Information Systems Inc.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
1999-06-20 10:08:13 +04:00
|
|
|
* This product includes software developed for the NetBSD Project by
|
1997-09-27 03:02:53 +04:00
|
|
|
* Piermont Information Systems Inc.
|
|
|
|
* 4. The name of Piermont Information Systems Inc. may not be used to endorse
|
|
|
|
* or promote products derived from this software without specific prior
|
|
|
|
* written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
|
|
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
|
|
|
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
|
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* defs.h -- definitions for use in the sysinst program. */
|
|
|
|
|
1997-10-15 08:35:17 +04:00
|
|
|
/* System includes needed for this. */
|
|
|
|
#include <sys/types.h>
|
1999-03-31 04:44:48 +04:00
|
|
|
#define FSTYPENAMES
|
1997-10-15 08:35:17 +04:00
|
|
|
#include <sys/disklabel.h>
|
|
|
|
|
1999-07-05 01:32:48 +04:00
|
|
|
#include "msg_defs.h"
|
|
|
|
|
2000-01-13 21:52:21 +03:00
|
|
|
#define min(a,b) (a < b ? a : b)
|
|
|
|
#define max(a,b) (a > b ? a : b)
|
|
|
|
|
1997-09-27 03:02:53 +04:00
|
|
|
/* Define for external varible use */
|
|
|
|
#ifdef MAIN
|
|
|
|
#define EXTERN
|
|
|
|
#define INIT(x) = x
|
|
|
|
#else
|
|
|
|
#define EXTERN extern
|
|
|
|
#define INIT(x)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* constants */
|
|
|
|
#define MEG 1048576
|
|
|
|
#define STRSIZE 255
|
1997-10-07 08:01:29 +04:00
|
|
|
#define SSTRSIZE 30
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
/* For run.c: collect() */
|
|
|
|
#define T_FILE 0
|
|
|
|
#define T_OUTPUT 1
|
|
|
|
|
2000-10-12 03:47:55 +04:00
|
|
|
/* run_prog flags */
|
|
|
|
#define RUN_DISPLAY 0x0001 /* run in subwindow */
|
|
|
|
#define RUN_FATAL 0x0002 /* errors are fatal */
|
|
|
|
#define RUN_CHROOT 0x0004 /* chroot to target disk */
|
|
|
|
#define RUN_FULLSCREEN 0x0008 /* fullscreen (use with RUN_DISPLAY) */
|
|
|
|
#define RUN_SYSTEM 0x0010 /* just use system(3) */
|
|
|
|
|
1997-09-27 03:02:53 +04:00
|
|
|
/* Macros */
|
|
|
|
|
|
|
|
/* Round up to the next full cylinder size */
|
|
|
|
#define NUMSEC(size,sizemult,cylsize) \
|
1997-11-01 02:00:32 +03:00
|
|
|
((size == -1) ? -1 : (sizemult == 1) ? (size) : \
|
1997-09-27 03:02:53 +04:00
|
|
|
(((size)*(sizemult)+(cylsize)-1)/(cylsize))*(cylsize))
|
1997-12-10 07:36:19 +03:00
|
|
|
|
extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes. details:
- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap. a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing. this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'. create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.
[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB. as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 05:38:13 +03:00
|
|
|
/* What FS type? */
|
|
|
|
#define PI_ISBSDFS(p) ((p)->pi_fstype == FS_BSDLFS || \
|
|
|
|
(p)->pi_fstype == FS_BSDFFS)
|
|
|
|
|
1997-10-29 04:06:42 +03:00
|
|
|
/* Types */
|
|
|
|
typedef struct distinfo {
|
|
|
|
char *name;
|
|
|
|
int getit;
|
|
|
|
char *fdlast;
|
|
|
|
char *desc;
|
|
|
|
} distinfo;
|
1997-09-27 03:02:53 +04:00
|
|
|
|
1999-03-31 04:44:48 +04:00
|
|
|
typedef struct _partinfo {
|
|
|
|
int pi_size;
|
|
|
|
int pi_offset;
|
|
|
|
int pi_fstype;
|
|
|
|
int pi_bsize;
|
|
|
|
int pi_fsize;
|
|
|
|
} partinfo; /* Single partition from a disklabel */
|
1997-12-04 14:27:56 +03:00
|
|
|
|
1997-09-27 03:02:53 +04:00
|
|
|
/* variables */
|
|
|
|
|
2000-06-19 03:50:02 +04:00
|
|
|
EXTERN char m_continue[STRSIZE] INIT("");
|
|
|
|
|
1997-11-04 04:39:03 +03:00
|
|
|
EXTERN char rel[SSTRSIZE] INIT(REL);
|
1997-11-05 04:23:06 +03:00
|
|
|
EXTERN char machine[SSTRSIZE] INIT(MACH);
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
EXTERN int yesno;
|
1997-12-05 17:00:59 +03:00
|
|
|
EXTERN int ignorerror;
|
1999-06-22 04:43:57 +04:00
|
|
|
EXTERN int ttysig_ignore;
|
|
|
|
EXTERN pid_t ttysig_forward;
|
1997-09-27 03:02:53 +04:00
|
|
|
EXTERN int layoutkind;
|
|
|
|
EXTERN int sizemult INIT(1);
|
1999-07-05 01:32:48 +04:00
|
|
|
EXTERN const char *multname;
|
|
|
|
EXTERN const char *doingwhat;
|
1997-09-27 03:02:53 +04:00
|
|
|
|
1999-01-21 11:02:17 +03:00
|
|
|
/* loging variables */
|
|
|
|
|
|
|
|
EXTERN int logging;
|
|
|
|
EXTERN int scripting;
|
|
|
|
EXTERN FILE *log;
|
|
|
|
EXTERN FILE *script;
|
|
|
|
|
1997-09-27 03:02:53 +04:00
|
|
|
/* Hardware variables */
|
1997-10-07 08:01:29 +04:00
|
|
|
EXTERN long ramsize INIT(0);
|
|
|
|
EXTERN int rammb INIT(0);
|
|
|
|
|
|
|
|
/* Disk descriptions */
|
|
|
|
#define MAX_DISKS 15
|
|
|
|
struct disk_desc {
|
1999-03-14 17:19:05 +03:00
|
|
|
char dd_name[SSTRSIZE];
|
|
|
|
struct disk_geom {
|
|
|
|
int dg_cyl;
|
|
|
|
int dg_head;
|
|
|
|
int dg_sec;
|
|
|
|
int dg_secsize;
|
|
|
|
int dg_totsec;
|
|
|
|
} dg;
|
1997-10-07 08:01:29 +04:00
|
|
|
};
|
1999-03-14 17:19:05 +03:00
|
|
|
#define dd_cyl dg.dg_cyl
|
|
|
|
#define dd_head dg.dg_head
|
|
|
|
#define dd_sec dg.dg_sec
|
|
|
|
#define dd_secsize dg.dg_secsize
|
|
|
|
#define dd_totsec dg.dg_totsec
|
|
|
|
|
1997-10-07 08:01:29 +04:00
|
|
|
EXTERN struct disk_desc disks[MAX_DISKS];
|
|
|
|
|
|
|
|
EXTERN struct disk_desc *disk;
|
1997-09-27 03:02:53 +04:00
|
|
|
EXTERN int sectorsize;
|
|
|
|
|
1997-10-07 08:01:29 +04:00
|
|
|
/* Actual name of the disk. */
|
2000-09-20 23:53:35 +04:00
|
|
|
EXTERN char diskdev[SSTRSIZE] INIT("");
|
1997-10-07 08:01:29 +04:00
|
|
|
EXTERN char disknames[STRSIZE];
|
1997-09-27 03:02:53 +04:00
|
|
|
EXTERN int numdisks;
|
|
|
|
EXTERN char *disktype; /* ST506, SCSI, ... */
|
2000-09-27 16:42:04 +04:00
|
|
|
EXTERN char swapdev[SSTRSIZE] INIT("");
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
/* Used in editing partitions ... BSD disklabel and others */
|
|
|
|
EXTERN int editpart;
|
|
|
|
|
1997-11-01 02:00:32 +03:00
|
|
|
/* Partition start and size in disk sectors. */
|
|
|
|
EXTERN int ptstart, ptsize;
|
|
|
|
|
|
|
|
/* File system disk size. File system partition size. May not include
|
|
|
|
full disk size. */
|
|
|
|
EXTERN int fsdsize, fsptsize;
|
|
|
|
|
|
|
|
|
1997-09-27 03:02:53 +04:00
|
|
|
EXTERN int fsdmb;
|
|
|
|
EXTERN int minfsdmb;
|
|
|
|
EXTERN int partstart;
|
|
|
|
EXTERN int partsize;
|
|
|
|
|
|
|
|
/* set by md_get_info() */
|
|
|
|
EXTERN int dlcyl, dlhead, dlsec, dlsize, dlcylsize;
|
2000-03-15 01:42:48 +03:00
|
|
|
EXTERN int current_cylsize;
|
1997-09-27 03:02:53 +04:00
|
|
|
/* Information for the NetBSD disklabel */
|
1999-08-16 12:29:04 +04:00
|
|
|
enum DLTR {A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z};
|
|
|
|
#define partition_name(x) ('a' + (x))
|
1997-12-04 14:27:56 +03:00
|
|
|
EXTERN partinfo bsdlabel[16];
|
1997-11-06 01:45:53 +03:00
|
|
|
EXTERN char fsmount[16][20] INIT({""});
|
extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes. details:
- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap. a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing. this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'. create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.
[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB. as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 05:38:13 +03:00
|
|
|
#define PM_INIT {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
|
|
|
|
EXTERN int preservemount[16] INIT(PM_INIT);
|
|
|
|
#undef PM_INIT
|
1997-12-04 12:05:35 +03:00
|
|
|
#define DISKNAME_SIZE 80
|
|
|
|
EXTERN char bsddiskname[DISKNAME_SIZE];
|
1997-09-27 03:02:53 +04:00
|
|
|
EXTERN char *doessf INIT("");
|
|
|
|
|
|
|
|
/* other vars for menu communication */
|
|
|
|
EXTERN int nodist;
|
1997-09-27 04:09:22 +04:00
|
|
|
EXTERN int got_dist;
|
1997-11-11 03:43:31 +03:00
|
|
|
/* Relative file name for storing a distribution. */
|
|
|
|
EXTERN char dist_dir[STRSIZE] INIT("/usr/INSTALL");
|
1997-09-27 04:09:22 +04:00
|
|
|
EXTERN int clean_dist_dir INIT(0);
|
1997-11-11 03:43:31 +03:00
|
|
|
/* Absolute path name where the distribution should be extracted from. */
|
1998-10-25 22:15:04 +03:00
|
|
|
|
2000-03-25 00:56:04 +03:00
|
|
|
#if !defined(FTP_HOST)
|
|
|
|
#define FTP_HOST ftp.netbsd.org
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(FTP_DIR)
|
|
|
|
#define FTP_DIR pub/NetBSD/NetBSD-
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define STRING(x) __STRING(x)
|
|
|
|
|
1997-11-11 03:43:31 +03:00
|
|
|
EXTERN char ext_dir[STRSIZE] INIT("");
|
2000-03-25 00:56:04 +03:00
|
|
|
EXTERN char ftp_host[STRSIZE] INIT(STRING(FTP_HOST));
|
|
|
|
EXTERN char ftp_dir[STRSIZE] INIT(STRING(FTP_DIR));
|
1997-11-25 09:53:07 +03:00
|
|
|
EXTERN char ftp_prefix[STRSIZE] INIT("/binary/sets");
|
1997-09-27 03:02:53 +04:00
|
|
|
EXTERN char ftp_user[STRSIZE] INIT("ftp");
|
|
|
|
EXTERN char ftp_pass[STRSIZE] INIT("");
|
|
|
|
|
1997-10-15 08:35:17 +04:00
|
|
|
EXTERN char nfs_host[STRSIZE] INIT("");
|
|
|
|
EXTERN char nfs_dir[STRSIZE] INIT("");
|
|
|
|
|
1997-10-20 10:13:25 +04:00
|
|
|
EXTERN char cdrom_dev[SSTRSIZE] INIT("cd0");
|
1998-06-22 16:18:52 +04:00
|
|
|
EXTERN char cdrom_dir[STRSIZE] INIT("/");
|
1997-10-20 10:13:25 +04:00
|
|
|
|
1997-11-06 01:45:53 +03:00
|
|
|
EXTERN char localfs_dev[SSTRSIZE] INIT("sd0");
|
|
|
|
EXTERN char localfs_fs[SSTRSIZE] INIT("ffs");
|
1997-11-11 03:43:31 +03:00
|
|
|
EXTERN char localfs_dir[STRSIZE] INIT("");
|
1997-11-06 01:45:53 +03:00
|
|
|
|
1998-02-20 05:33:51 +03:00
|
|
|
EXTERN char targetroot_mnt[STRSIZE] INIT ("/mnt");
|
|
|
|
EXTERN char distfs_mnt[STRSIZE] INIT ("/mnt2");
|
|
|
|
|
1997-10-20 10:13:25 +04:00
|
|
|
EXTERN int mnt2_mounted INIT(0);
|
|
|
|
|
1997-11-25 09:53:07 +03:00
|
|
|
EXTERN char dist_postfix[STRSIZE] INIT(".tgz");
|
|
|
|
|
1997-09-27 03:02:53 +04:00
|
|
|
/* Vars for runing commands ... */
|
|
|
|
EXTERN char command[STRSIZE];
|
|
|
|
|
|
|
|
/* Access to network information */
|
2000-07-24 14:52:28 +04:00
|
|
|
EXTERN char net_devices[STRSIZE] INIT("");
|
1997-09-27 03:02:53 +04:00
|
|
|
EXTERN char net_dev[STRSIZE] INIT("");
|
|
|
|
EXTERN char net_domain[STRSIZE] INIT("");
|
|
|
|
EXTERN char net_host[STRSIZE] INIT("");
|
|
|
|
EXTERN char net_ip[STRSIZE] INIT("");
|
|
|
|
EXTERN char net_mask[STRSIZE] INIT("");
|
|
|
|
EXTERN char net_namesvr[STRSIZE] INIT("");
|
|
|
|
EXTERN char net_defroute[STRSIZE] INIT("");
|
1997-12-26 04:58:44 +03:00
|
|
|
EXTERN char net_media[STRSIZE] INIT("");
|
2000-07-24 14:52:28 +04:00
|
|
|
EXTERN int net_dhcpconf INIT(0);
|
|
|
|
#define DHCPCONF_IPADDR 0x01
|
|
|
|
#define DHCPCONF_NAMESVR 0x02
|
|
|
|
#define DHCPCONF_HOST 0x04
|
|
|
|
#define DHCPCONF_DOMAIN 0x08
|
2000-01-04 11:33:51 +03:00
|
|
|
#ifdef INET6
|
|
|
|
EXTERN char net_ip6[STRSIZE] INIT("");
|
|
|
|
EXTERN char net_namesvr6[STRSIZE] INIT("");
|
2001-04-15 15:08:51 +04:00
|
|
|
EXTERN int net_ip6conf INIT(0);
|
|
|
|
#define IP6CONF_AUTOHOST 0x01
|
2000-01-04 11:33:51 +03:00
|
|
|
#endif
|
1997-09-27 03:02:53 +04:00
|
|
|
|
1997-10-01 09:04:24 +04:00
|
|
|
/* Variables for upgrade. */
|
1999-03-31 04:44:48 +04:00
|
|
|
#if 0
|
1997-10-01 09:04:24 +04:00
|
|
|
#define MAXFS 16
|
|
|
|
EXTERN char fs_dev[MAXFS][STRSIZE];
|
|
|
|
EXTERN char fs_mount[MAXFS][STRSIZE];
|
1999-03-31 04:44:48 +04:00
|
|
|
#endif
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
/* needed prototypes */
|
|
|
|
|
|
|
|
/* Machine dependent functions .... */
|
2000-12-22 13:12:12 +03:00
|
|
|
int md_check_partitions (void);
|
|
|
|
void md_cleanup_install (void);
|
|
|
|
int md_copy_filesystem (void);
|
|
|
|
int md_get_info (void);
|
|
|
|
int md_make_bsd_partitions (void);
|
|
|
|
int md_post_disklabel (void);
|
|
|
|
int md_post_newfs (void);
|
|
|
|
int md_pre_disklabel (void);
|
|
|
|
int md_pre_update (void);
|
|
|
|
int md_update (void);
|
|
|
|
void md_init (void);
|
extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes. details:
- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap. a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing. this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'. create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.
[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB. as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 05:38:13 +03:00
|
|
|
void md_set_sizemultname (void);
|
|
|
|
void md_set_no_x (void);
|
1997-09-27 03:02:53 +04:00
|
|
|
|
1997-12-04 12:05:35 +03:00
|
|
|
/* from main.c */
|
2000-12-22 13:12:12 +03:00
|
|
|
void toplevel (void);
|
1997-12-04 12:05:35 +03:00
|
|
|
|
1997-10-15 08:35:17 +04:00
|
|
|
/* from disks.c */
|
2000-12-22 13:12:12 +03:00
|
|
|
int find_disks (void);
|
|
|
|
void disp_cur_fspart (int, int);
|
|
|
|
int write_disklabel (void);
|
|
|
|
int make_filesystems (void);
|
|
|
|
int make_fstab (void);
|
|
|
|
int fsck_disks (void);
|
|
|
|
int set_swap (const char *, partinfo *, int);
|
1997-09-27 03:02:53 +04:00
|
|
|
|
extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes. details:
- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap. a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing. this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'. create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.
[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB. as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 05:38:13 +03:00
|
|
|
/* from disks_lfs.c */
|
|
|
|
int fs_is_lfs (void *);
|
|
|
|
|
1997-12-04 14:27:56 +03:00
|
|
|
/* from label.c */
|
|
|
|
|
2000-12-22 13:12:12 +03:00
|
|
|
void emptylabel (partinfo *lp);
|
|
|
|
int savenewlabel (partinfo *lp, int nparts);
|
|
|
|
int incorelabel (const char *dkname, partinfo *lp);
|
|
|
|
int edit_and_check_label (partinfo *lp, int nparts,
|
|
|
|
int rawpart, int bsdpart);
|
|
|
|
int getpartoff (msg msg_no, int partstart);
|
|
|
|
int getpartsize (msg msg_no, int partstart, int defpartsize);
|
1997-12-04 14:27:56 +03:00
|
|
|
|
1997-10-15 08:35:17 +04:00
|
|
|
/* from install.c */
|
2000-12-22 13:12:12 +03:00
|
|
|
void do_install (void);
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
/* from factor.c */
|
2000-12-22 13:12:12 +03:00
|
|
|
void factor (long, long *, int, int *);
|
1997-10-15 08:35:17 +04:00
|
|
|
|
1999-03-31 04:44:48 +04:00
|
|
|
/* from fdisk.c */
|
2000-12-22 13:12:12 +03:00
|
|
|
void get_disk_info (char *);
|
|
|
|
void set_disk_info (char *);
|
1999-03-31 04:44:48 +04:00
|
|
|
|
1997-10-15 08:35:17 +04:00
|
|
|
/* from geom.c */
|
2000-12-22 13:12:12 +03:00
|
|
|
int get_geom (char *, struct disklabel *);
|
extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes. details:
- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap. a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing. this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'. create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.
[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB. as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 05:38:13 +03:00
|
|
|
int get_real_geom (char *, struct disklabel *);
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
/* from net.c */
|
2000-12-22 13:12:12 +03:00
|
|
|
int get_via_ftp (void);
|
|
|
|
int get_via_nfs (void);
|
|
|
|
int config_network (void);
|
|
|
|
void mnt_net_config (void);
|
1997-09-27 03:02:53 +04:00
|
|
|
|
1997-10-15 08:35:17 +04:00
|
|
|
/* From run.c */
|
2000-12-22 13:12:12 +03:00
|
|
|
int collect (int kind, char **buffer, const char *name, ...);
|
|
|
|
int run_prog (int, msg, const char *, ...);
|
|
|
|
void do_logging (void);
|
|
|
|
int do_system (const char *);
|
1997-10-15 08:35:17 +04:00
|
|
|
|
|
|
|
/* from upgrade.c */
|
2000-12-22 13:12:12 +03:00
|
|
|
void do_upgrade (void);
|
|
|
|
void do_reinstall_sets (void);
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
/* from util.c */
|
2000-12-22 13:12:12 +03:00
|
|
|
int askyesno (int reverse);
|
1997-12-05 17:00:59 +03:00
|
|
|
int dir_exists_p(const char *path);
|
|
|
|
int file_exists_p(const char *path);
|
2000-09-26 17:26:02 +04:00
|
|
|
int file_mode_match(const char *path, unsigned int mode);
|
2000-12-22 13:12:12 +03:00
|
|
|
int distribution_sets_exist_p (const char *path);
|
|
|
|
void get_ramsize (void);
|
|
|
|
void ask_sizemult (int);
|
|
|
|
void reask_sizemult (int);
|
|
|
|
void run_makedev (void);
|
|
|
|
int get_via_floppy (void);
|
|
|
|
int get_via_cdrom (void);
|
|
|
|
int get_via_localfs (void);
|
|
|
|
int get_via_localdir (void);
|
|
|
|
void cd_dist_dir (char *);
|
|
|
|
void toggle_getit (int);
|
|
|
|
void show_cur_distsets (void);
|
|
|
|
void make_ramdisk_dir (const char *path);
|
|
|
|
void ask_verbose_dist (void);
|
1999-07-05 01:32:48 +04:00
|
|
|
int get_and_unpack_sets(msg success_msg, msg failure_msg);
|
2000-12-22 13:12:12 +03:00
|
|
|
int sanity_check (void);
|
|
|
|
int set_timezone (void);
|
|
|
|
int set_root_password (void);
|
extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes. details:
- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap. a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing. this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'. create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.
[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB. as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 05:38:13 +03:00
|
|
|
void scripting_fprintf(FILE *, const char *, ...);
|
|
|
|
void scripting_vfprintf(FILE *, const char *, va_list);
|
|
|
|
void add_rc_conf(const char *, ...);
|
|
|
|
int check_partitions(void);
|
|
|
|
void set_sizemultname_cyl(void);
|
|
|
|
void set_sizemultname_meg(void);
|
|
|
|
int check_lfs_progs(void);
|
1997-11-02 12:41:57 +03:00
|
|
|
|
|
|
|
/* from target.c */
|
2000-12-22 13:12:12 +03:00
|
|
|
int must_mount_root (void);
|
|
|
|
const char* concat_paths (const char *prefix, const char *suffix);
|
|
|
|
char *target_realpath (const char *path, char *resolved);
|
|
|
|
const char * target_expand (const char *pathname);
|
|
|
|
void make_target_dir (const char *path);
|
|
|
|
void append_to_target_file (const char *path, const char *string);
|
|
|
|
void echo_to_target_file ( const char *path, const char *string);
|
|
|
|
void sprintf_to_target_file ( const char *path, const char *fmt, ...);
|
|
|
|
void trunc_target_file (const char *path);
|
|
|
|
const char* target_prefix (void);
|
|
|
|
int target_chdir (const char *path);
|
|
|
|
void target_chdir_or_die (const char *dir);
|
|
|
|
int target_already_root (void);
|
|
|
|
FILE* target_fopen (const char *filename, const char *type);
|
|
|
|
int target_collect_file (int kind, char **buffer, char *name);
|
|
|
|
int is_active_rootpart (const char *partname);
|
|
|
|
int cp_to_target (const char *src, const char *tgt_dst);
|
|
|
|
void dup_file_into_target (const char *filename);
|
|
|
|
void mv_within_target_or_die (const char *from, const char *to);
|
|
|
|
int cp_within_target (const char *frompath, const char *topath);
|
|
|
|
int target_mount (const char *fstype, const char *from, const char* on);
|
|
|
|
int target_test (unsigned int, const char*);
|
|
|
|
int target_dir_exists_p (const char *path);
|
|
|
|
int target_file_exists_p (const char *path);
|
|
|
|
int target_symlink_exists_p (const char *path);
|
|
|
|
void unwind_mounts (void);
|
1997-12-04 14:27:56 +03:00
|
|
|
|
extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes. details:
- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap. a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing. this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'. create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.
[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB. as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 05:38:13 +03:00
|
|
|
/* from bsddisklabel.c */
|
|
|
|
void show_cur_filesystems (void);
|
|
|
|
extern int layout_swap, layout_usr, layout_tmp, layout_var, layout_home;
|