* add SVR4 and OSF/1 enabling in the Start Up config menu
* deals with X11 install when all we have is the Port (such as on the Alpha) Ok'ed by: JKH
This commit is contained in:
parent
0b04a9eef3
commit
2af3c5f687
@ -19,6 +19,9 @@ SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c kget.c \
|
||||
|
||||
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR}
|
||||
CFLAGS+= -I${.CURDIR}/../../sys
|
||||
.if ${MACHINE_ARCH} != "i386"
|
||||
CFLAGS+= -DX_AS_PKG
|
||||
.endif
|
||||
|
||||
DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} ${LIBDISK} ${LIBFTPIO}
|
||||
LDADD= -ldialog -lncurses -lmytinfo -lutil -ldisk -lftpio
|
||||
|
@ -271,7 +271,10 @@ distSetX(void)
|
||||
XF86Dists = DIST_XF86_BIN | DIST_XF86_SET | DIST_XF86_CFG | DIST_XF86_LIB | DIST_XF86_PROG | DIST_XF86_MAN | DIST_XF86_SERVER | DIST_XF86_FONTS;
|
||||
XF86ServerDists = DIST_XF86_SERVER_SVGA | DIST_XF86_SERVER_VGA16;
|
||||
XF86FontDists = DIST_XF86_FONTS_MISC;
|
||||
#ifndef X_AS_PKG
|
||||
return distSetXF86(NULL);
|
||||
#endif
|
||||
return DITEM_SUCCESS;
|
||||
}
|
||||
|
||||
int
|
||||
@ -850,7 +853,7 @@ printSelected(char *buf, int selected, Distribution *me, int *col)
|
||||
int
|
||||
distExtractAll(dialogMenuItem *self)
|
||||
{
|
||||
int old_dists, retries = 0, status = DITEM_SUCCESS;
|
||||
int old_dists, retries = 0, status = DITEM_SUCCESS, want_x_package = 0;
|
||||
char buf[512];
|
||||
WINDOW *w;
|
||||
|
||||
@ -869,11 +872,24 @@ distExtractAll(dialogMenuItem *self)
|
||||
dialog_clear_norefresh();
|
||||
w = savescr();
|
||||
msgNotify("Attempting to install all selected distributions..");
|
||||
|
||||
#ifdef X_AS_PKG
|
||||
/* Clear any XFree86 dist flags, but remember they were present. */
|
||||
if(Dists & DIST_XF86)
|
||||
want_x_package = 1;
|
||||
Dists &= ~DIST_XF86;
|
||||
/*Dists &= ~(DIST_XF86 | XF86Dists | XF86ServerDists | XF86FontDists);*/
|
||||
#endif
|
||||
|
||||
/* Try for 3 times around the loop, then give up. */
|
||||
while (Dists && ++retries < 3)
|
||||
distExtract(NULL, DistTable);
|
||||
|
||||
#ifdef X_AS_PKG
|
||||
if (want_x_package)
|
||||
status |= installX11package(NULL);
|
||||
#endif
|
||||
|
||||
dialog_clear_norefresh();
|
||||
/* Only do bin fixup if bin dist was successfully extracted */
|
||||
if ((old_dists & DIST_BIN) && !(Dists & DIST_BIN))
|
||||
|
@ -797,6 +797,21 @@ installFixupBin(dialogMenuItem *self)
|
||||
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||
}
|
||||
|
||||
#ifdef X_AS_PKG
|
||||
int
|
||||
installX11package(dialogMenuItem *self)
|
||||
{
|
||||
WINDOW *w = savescr();
|
||||
int i;
|
||||
|
||||
dialog_clear_norefresh();
|
||||
msgNotify("Installing XFree86 package...");
|
||||
i = package_add("XFree86");
|
||||
restorescr(w);
|
||||
return i;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Fix side-effects from the the XFree86 installation */
|
||||
int
|
||||
installFixupXFree(dialogMenuItem *self)
|
||||
@ -808,12 +823,14 @@ installFixupXFree(dialogMenuItem *self)
|
||||
vsystem("chmod -R a+r /usr/X11R6");
|
||||
vsystem("find /usr/X11R6 -type d | xargs chmod a+x");
|
||||
|
||||
#ifndef X_AS_PKG
|
||||
/* Also do bogus minimal package registration so ports don't whine */
|
||||
if (file_readable("/usr/X11R6/lib/X11/pkgreg.tar.gz")) {
|
||||
dialog_clear_norefresh();
|
||||
msgNotify("Installing package metainfo..");
|
||||
vsystem("tar xpzf /usr/X11R6/lib/X11/pkgreg.tar.gz -C / && rm /usr/X11R6/lib/X11/pkgreg.tar.gz");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||
}
|
||||
|
@ -871,7 +871,11 @@ DMenu MenuSubDistributions = {
|
||||
{ " local", "Local additions collection",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LOCAL},
|
||||
{ " XFree86", "The XFree86 3.3.6 distribution",
|
||||
#ifdef X_AS_PKG
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_XF86 },
|
||||
#else
|
||||
x11FlagCheck, distSetXF86 },
|
||||
#endif
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -1304,8 +1308,13 @@ DMenu MenuStartup = {
|
||||
#ifdef __i386__
|
||||
{ " linux", "This host wants to be able to run linux binaries.",
|
||||
dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" },
|
||||
{ " SVR4", "This host wants to be able to run SVR4 binaries.",
|
||||
dmenuVarCheck, dmenuToggleVariable, NULL, "svr4_enable=YES" },
|
||||
{ " SCO", "This host wants to be able to run IBCS2 binaries.",
|
||||
dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" },
|
||||
#elif __alpha__
|
||||
{ " OSF/1", "This host wants to be able to run DEC OSF/1 binaries.",
|
||||
dmenuVarCheck, dmenuToggleVariable, NULL, "osf1_enable=YES" },
|
||||
#endif
|
||||
{ " quotas", "This host wishes to check quotas on startup.",
|
||||
dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" },
|
||||
|
@ -568,6 +568,7 @@ extern int installUpgrade(dialogMenuItem *self);
|
||||
extern int installFilesystems(dialogMenuItem *self);
|
||||
extern int installVarDefaults(dialogMenuItem *self);
|
||||
extern void installEnvironment(void);
|
||||
extern int installX11package(dialogMenuItem *self);
|
||||
extern Boolean copySelf(void);
|
||||
|
||||
/* kget.c */
|
||||
|
@ -19,6 +19,9 @@ SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c kget.c \
|
||||
|
||||
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR}
|
||||
CFLAGS+= -I${.CURDIR}/../../sys
|
||||
.if ${MACHINE_ARCH} != "i386"
|
||||
CFLAGS+= -DX_AS_PKG
|
||||
.endif
|
||||
|
||||
DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} ${LIBDISK} ${LIBFTPIO}
|
||||
LDADD= -ldialog -lncurses -lmytinfo -lutil -ldisk -lftpio
|
||||
|
@ -797,6 +797,21 @@ installFixupBin(dialogMenuItem *self)
|
||||
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||
}
|
||||
|
||||
#ifdef X_AS_PKG
|
||||
int
|
||||
installX11package(dialogMenuItem *self)
|
||||
{
|
||||
WINDOW *w = savescr();
|
||||
int i;
|
||||
|
||||
dialog_clear_norefresh();
|
||||
msgNotify("Installing XFree86 package...");
|
||||
i = package_add("XFree86");
|
||||
restorescr(w);
|
||||
return i;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Fix side-effects from the the XFree86 installation */
|
||||
int
|
||||
installFixupXFree(dialogMenuItem *self)
|
||||
@ -808,12 +823,14 @@ installFixupXFree(dialogMenuItem *self)
|
||||
vsystem("chmod -R a+r /usr/X11R6");
|
||||
vsystem("find /usr/X11R6 -type d | xargs chmod a+x");
|
||||
|
||||
#ifndef X_AS_PKG
|
||||
/* Also do bogus minimal package registration so ports don't whine */
|
||||
if (file_readable("/usr/X11R6/lib/X11/pkgreg.tar.gz")) {
|
||||
dialog_clear_norefresh();
|
||||
msgNotify("Installing package metainfo..");
|
||||
vsystem("tar xpzf /usr/X11R6/lib/X11/pkgreg.tar.gz -C / && rm /usr/X11R6/lib/X11/pkgreg.tar.gz");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||
}
|
||||
|
@ -871,7 +871,11 @@ DMenu MenuSubDistributions = {
|
||||
{ " local", "Local additions collection",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LOCAL},
|
||||
{ " XFree86", "The XFree86 3.3.6 distribution",
|
||||
#ifdef X_AS_PKG
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_XF86 },
|
||||
#else
|
||||
x11FlagCheck, distSetXF86 },
|
||||
#endif
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -1304,8 +1308,13 @@ DMenu MenuStartup = {
|
||||
#ifdef __i386__
|
||||
{ " linux", "This host wants to be able to run linux binaries.",
|
||||
dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" },
|
||||
{ " SVR4", "This host wants to be able to run SVR4 binaries.",
|
||||
dmenuVarCheck, dmenuToggleVariable, NULL, "svr4_enable=YES" },
|
||||
{ " SCO", "This host wants to be able to run IBCS2 binaries.",
|
||||
dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" },
|
||||
#elif __alpha__
|
||||
{ " OSF/1", "This host wants to be able to run DEC OSF/1 binaries.",
|
||||
dmenuVarCheck, dmenuToggleVariable, NULL, "osf1_enable=YES" },
|
||||
#endif
|
||||
{ " quotas", "This host wishes to check quotas on startup.",
|
||||
dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" },
|
||||
|
@ -568,6 +568,7 @@ extern int installUpgrade(dialogMenuItem *self);
|
||||
extern int installFilesystems(dialogMenuItem *self);
|
||||
extern int installVarDefaults(dialogMenuItem *self);
|
||||
extern void installEnvironment(void);
|
||||
extern int installX11package(dialogMenuItem *self);
|
||||
extern Boolean copySelf(void);
|
||||
|
||||
/* kget.c */
|
||||
|
@ -19,6 +19,9 @@ SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c kget.c \
|
||||
|
||||
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR}
|
||||
CFLAGS+= -I${.CURDIR}/../../sys
|
||||
.if ${MACHINE_ARCH} != "i386"
|
||||
CFLAGS+= -DX_AS_PKG
|
||||
.endif
|
||||
|
||||
DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} ${LIBDISK} ${LIBFTPIO}
|
||||
LDADD= -ldialog -lncurses -lmytinfo -lutil -ldisk -lftpio
|
||||
|
@ -271,7 +271,10 @@ distSetX(void)
|
||||
XF86Dists = DIST_XF86_BIN | DIST_XF86_SET | DIST_XF86_CFG | DIST_XF86_LIB | DIST_XF86_PROG | DIST_XF86_MAN | DIST_XF86_SERVER | DIST_XF86_FONTS;
|
||||
XF86ServerDists = DIST_XF86_SERVER_SVGA | DIST_XF86_SERVER_VGA16;
|
||||
XF86FontDists = DIST_XF86_FONTS_MISC;
|
||||
#ifndef X_AS_PKG
|
||||
return distSetXF86(NULL);
|
||||
#endif
|
||||
return DITEM_SUCCESS;
|
||||
}
|
||||
|
||||
int
|
||||
@ -850,7 +853,7 @@ printSelected(char *buf, int selected, Distribution *me, int *col)
|
||||
int
|
||||
distExtractAll(dialogMenuItem *self)
|
||||
{
|
||||
int old_dists, retries = 0, status = DITEM_SUCCESS;
|
||||
int old_dists, retries = 0, status = DITEM_SUCCESS, want_x_package = 0;
|
||||
char buf[512];
|
||||
WINDOW *w;
|
||||
|
||||
@ -869,11 +872,24 @@ distExtractAll(dialogMenuItem *self)
|
||||
dialog_clear_norefresh();
|
||||
w = savescr();
|
||||
msgNotify("Attempting to install all selected distributions..");
|
||||
|
||||
#ifdef X_AS_PKG
|
||||
/* Clear any XFree86 dist flags, but remember they were present. */
|
||||
if(Dists & DIST_XF86)
|
||||
want_x_package = 1;
|
||||
Dists &= ~DIST_XF86;
|
||||
/*Dists &= ~(DIST_XF86 | XF86Dists | XF86ServerDists | XF86FontDists);*/
|
||||
#endif
|
||||
|
||||
/* Try for 3 times around the loop, then give up. */
|
||||
while (Dists && ++retries < 3)
|
||||
distExtract(NULL, DistTable);
|
||||
|
||||
#ifdef X_AS_PKG
|
||||
if (want_x_package)
|
||||
status |= installX11package(NULL);
|
||||
#endif
|
||||
|
||||
dialog_clear_norefresh();
|
||||
/* Only do bin fixup if bin dist was successfully extracted */
|
||||
if ((old_dists & DIST_BIN) && !(Dists & DIST_BIN))
|
||||
|
@ -797,6 +797,21 @@ installFixupBin(dialogMenuItem *self)
|
||||
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||
}
|
||||
|
||||
#ifdef X_AS_PKG
|
||||
int
|
||||
installX11package(dialogMenuItem *self)
|
||||
{
|
||||
WINDOW *w = savescr();
|
||||
int i;
|
||||
|
||||
dialog_clear_norefresh();
|
||||
msgNotify("Installing XFree86 package...");
|
||||
i = package_add("XFree86");
|
||||
restorescr(w);
|
||||
return i;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Fix side-effects from the the XFree86 installation */
|
||||
int
|
||||
installFixupXFree(dialogMenuItem *self)
|
||||
@ -808,12 +823,14 @@ installFixupXFree(dialogMenuItem *self)
|
||||
vsystem("chmod -R a+r /usr/X11R6");
|
||||
vsystem("find /usr/X11R6 -type d | xargs chmod a+x");
|
||||
|
||||
#ifndef X_AS_PKG
|
||||
/* Also do bogus minimal package registration so ports don't whine */
|
||||
if (file_readable("/usr/X11R6/lib/X11/pkgreg.tar.gz")) {
|
||||
dialog_clear_norefresh();
|
||||
msgNotify("Installing package metainfo..");
|
||||
vsystem("tar xpzf /usr/X11R6/lib/X11/pkgreg.tar.gz -C / && rm /usr/X11R6/lib/X11/pkgreg.tar.gz");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||
}
|
||||
|
@ -871,7 +871,11 @@ DMenu MenuSubDistributions = {
|
||||
{ " local", "Local additions collection",
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LOCAL},
|
||||
{ " XFree86", "The XFree86 3.3.6 distribution",
|
||||
#ifdef X_AS_PKG
|
||||
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_XF86 },
|
||||
#else
|
||||
x11FlagCheck, distSetXF86 },
|
||||
#endif
|
||||
{ NULL } },
|
||||
};
|
||||
|
||||
@ -1304,8 +1308,13 @@ DMenu MenuStartup = {
|
||||
#ifdef __i386__
|
||||
{ " linux", "This host wants to be able to run linux binaries.",
|
||||
dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" },
|
||||
{ " SVR4", "This host wants to be able to run SVR4 binaries.",
|
||||
dmenuVarCheck, dmenuToggleVariable, NULL, "svr4_enable=YES" },
|
||||
{ " SCO", "This host wants to be able to run IBCS2 binaries.",
|
||||
dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" },
|
||||
#elif __alpha__
|
||||
{ " OSF/1", "This host wants to be able to run DEC OSF/1 binaries.",
|
||||
dmenuVarCheck, dmenuToggleVariable, NULL, "osf1_enable=YES" },
|
||||
#endif
|
||||
{ " quotas", "This host wishes to check quotas on startup.",
|
||||
dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" },
|
||||
|
@ -568,6 +568,7 @@ extern int installUpgrade(dialogMenuItem *self);
|
||||
extern int installFilesystems(dialogMenuItem *self);
|
||||
extern int installVarDefaults(dialogMenuItem *self);
|
||||
extern void installEnvironment(void);
|
||||
extern int installX11package(dialogMenuItem *self);
|
||||
extern Boolean copySelf(void);
|
||||
|
||||
/* kget.c */
|
||||
|
Loading…
x
Reference in New Issue
Block a user