Remove sysinstall's ability to adjust the tape block size. Installs from

tape have been broken for quite a while, and I'll be removing the rest
of sysinstall's knowledge of tapes shortly.  I'm doing this piece now
because I want to switch from gnu's cpio to bsdcpio being integrated
into the installation environment and bsdcpio doesn't seem to handle
block sizes at all.
This commit is contained in:
kensmith 2008-08-20 13:21:04 +00:00
parent 94ea0dfc30
commit d715fc216c
5 changed files with 6 additions and 21 deletions

View File

@ -1194,7 +1194,6 @@ installVarDefaults(dialogMenuItem *self)
variable_set2(VAR_RELNAME, cp, 0);
free(cp);
variable_set2(VAR_CPIO_VERBOSITY, "high", 0);
variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE, 0);
variable_set2(VAR_INSTALL_ROOT, "/", 0);
variable_set2(VAR_INSTALL_CFG, "install.cfg", 0);
variable_set2(VAR_SKIP_PCCARD, "NO", 0);

View File

@ -664,9 +664,9 @@ mediaExtractDistBegin(char *dir, int *fd, int *zpid, int *cpid)
dup2(1, 2);
}
if (strlen(cpioVerbosity()))
i = execl(cpio, cpio, "-idum", cpioVerbosity(), "--block-size", mediaTapeBlocksize(), (char *)0);
i = execl(cpio, cpio, "-idum", cpioVerbosity(), (char *)0);
else
i = execl(cpio, cpio, "-idum", "--block-size", mediaTapeBlocksize(), (char *)0);
i = execl(cpio, cpio, "-idum", (char *)0);
if (isDebug())
msgDebug("%s command returns %d status\n", cpio, i);
exit(i);
@ -752,9 +752,9 @@ mediaExtractDist(char *dir, char *dist, FILE *fp)
dup2(1, 2);
}
if (strlen(cpioVerbosity()))
i = execl(cpio, cpio, "-idum", cpioVerbosity(), "--block-size", mediaTapeBlocksize(), (char *)0);
i = execl(cpio, cpio, "-idum", cpioVerbosity(), (char *)0);
else
i = execl(cpio, cpio, "-idum", "--block-size", mediaTapeBlocksize(), (char *)0);
i = execl(cpio, cpio, "-idum", "--block-size", (char *)0);
if (isDebug())
msgDebug("%s command returns %d status\n", cpio, i);
exit(i);

View File

@ -97,7 +97,6 @@ mediaCheck(Option *opt)
return "<not yet set>";
}
#define TAPE_PROMPT "Please enter the tape block size in 512 byte blocks:"
#define NEWFS_PROMPT "Please enter newfs(8) parameters:"
#define RELNAME_PROMPT "Please specify the release you wish to load or\n\"any\" for a generic release install:"
#define BPKG_PROMPT "Please specify the name of the HTML browser package:"
@ -132,8 +131,6 @@ static Option Options[] = {
OPT_IS_FUNC, mediaSetFTPUserPass, VAR_FTP_USER, varCheck },
{ "Editor", "Which text editor to use during installation",
OPT_IS_VAR, EDITOR_PROMPT, VAR_EDITOR, varCheck },
{ "Tape Blocksize", "Tape media block size in 512 byte blocks",
OPT_IS_VAR, TAPE_PROMPT, VAR_TAPE_BLOCKSIZE, varCheck },
{ "Extract Detail", "How verbosely to display file name information during extractions",
OPT_IS_FUNC, mediaSetCPIOVerbosity, VAR_CPIO_VERBOSITY, varCheck },
{ "Release Name", "Which release to attempt to load from installation media",

View File

@ -188,7 +188,6 @@
#define VAR_SERIAL_SPEED "serialSpeed"
#define VAR_SLOW_ETHER "slowEthernetCard"
#define VAR_SWAP_SIZE "swapSize"
#define VAR_TAPE_BLOCKSIZE "tapeBlocksize"
#define VAR_TRY_DHCP "tryDHCP"
#define VAR_TRY_RTSOL "tryRTSOL"
#define VAR_SKIP_PCCARD "skipPCCARD"
@ -206,7 +205,6 @@
#else
#define DEFAULT_COUNTRY "us"
#endif
#define DEFAULT_TAPE_BLOCKSIZE "20"
/* One MB worth of blocks */
#define ONE_MEG 2048
@ -848,7 +846,6 @@ extern void systemCreateHoloshell(void);
extern int vsystem(char *fmt, ...) __printflike(1, 2);
/* tape.c */
extern char *mediaTapeBlocksize(void);
extern Boolean mediaInitTape(Device *dev);
extern FILE *mediaGetTape(Device *dev, char *file, Boolean probe);
extern void mediaShutdownTape(Device *dev);

View File

@ -42,14 +42,6 @@
static Boolean tapeInitted;
char *
mediaTapeBlocksize(void)
{
char *cp = variable_get(VAR_TAPE_BLOCKSIZE);
return cp ? cp : DEFAULT_TAPE_BLOCKSIZE;
}
Boolean
mediaInitTape(Device *dev)
{
@ -82,9 +74,9 @@ mediaGetTape(Device *dev, char *file, Boolean probe)
/* We know the tape is already in the drive, so go for it */
msgNotify("First extracting distributions from %s...", dev->description);
if (!strcmp(dev->name, "rft0"))
i = vsystem("ft | cpio -idum %s --block-size %s", cpioVerbosity(), mediaTapeBlocksize());
i = vsystem("ft | cpio -idum %s", cpioVerbosity());
else
i = vsystem("cpio -idum %s --block-size %s -I %s", cpioVerbosity(), mediaTapeBlocksize(), dev->devname);
i = vsystem("cpio -idum %s -I %s", cpioVerbosity(), dev->devname);
if (!i) {
tapeInitted = TRUE;
msgDebug("Tape initialized successfully.\n");