Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142696943
D34878.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
D34878.diff
View Options
diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile
--- a/usr.sbin/bsdinstall/Makefile
+++ b/usr.sbin/bsdinstall/Makefile
@@ -1,9 +1,18 @@
# $FreeBSD$
+OSNAME?= FreeBSD
SUBDIR= distextract distfetch partedit scripts
SUBDIR_PARALLEL=
SCRIPTS= bsdinstall
MAN= bsdinstall.8
PACKAGE= bsdinstall
+GENHDRS= opt_osname.h
+SRCS+= ${GENHDRS}
+CLEANFILES+= ${GENHDRS}
+
+opt_osname.h: .PHONY
+ if ! grep -q "^#define OSNAME \"${OSNAME}\"$"" ${.TARGET}; then \
+ echo "#define OSNAME \"${OSNAME}\"" > ${.TARGET}; \
+ fi
.include <bsd.prog.mk>
diff --git a/usr.sbin/bsdinstall/distextract/Makefile b/usr.sbin/bsdinstall/distextract/Makefile
--- a/usr.sbin/bsdinstall/distextract/Makefile
+++ b/usr.sbin/bsdinstall/distextract/Makefile
@@ -2,7 +2,7 @@
BINDIR= ${LIBEXECDIR}/bsdinstall
PROG= distextract
-CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib
+CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/..
LIBADD= archive bsddialog m
MAN=
diff --git a/usr.sbin/bsdinstall/distextract/distextract.c b/usr.sbin/bsdinstall/distextract/distextract.c
--- a/usr.sbin/bsdinstall/distextract/distextract.c
+++ b/usr.sbin/bsdinstall/distextract/distextract.c
@@ -45,6 +45,8 @@
#include <string.h>
#include <unistd.h>
+#include "opt_osname.h"
+
/* Data to process */
static const char *distdir = NULL;
static struct archive *archive = NULL;
@@ -82,7 +84,7 @@
errx(EXIT_FAILURE, "Error libbsdialog: %s",
bsddialog_geterror());
bsddialog_initconf(&conf);
- bsddialog_backtitle(&conf, "FreeBSD Installer");
+ bsddialog_backtitle(&conf, OSNAME " Installer");
bsddialog_infobox(&conf,
"Checking distribution archives.\nPlease wait...", 4, 35);
diff --git a/usr.sbin/bsdinstall/distfetch/Makefile b/usr.sbin/bsdinstall/distfetch/Makefile
--- a/usr.sbin/bsdinstall/distfetch/Makefile
+++ b/usr.sbin/bsdinstall/distfetch/Makefile
@@ -2,7 +2,7 @@
BINDIR= ${LIBEXECDIR}/bsdinstall
PROG= distfetch
-CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib
+CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/..
LIBADD= fetch bsddialog
MAN=
diff --git a/usr.sbin/bsdinstall/distfetch/distfetch.c b/usr.sbin/bsdinstall/distfetch/distfetch.c
--- a/usr.sbin/bsdinstall/distfetch/distfetch.c
+++ b/usr.sbin/bsdinstall/distfetch/distfetch.c
@@ -42,6 +42,8 @@
#include <string.h>
#include <unistd.h>
+#include "opt_osname.h"
+
static int fetch_files(int nfiles, char **urls);
int
@@ -76,7 +78,7 @@
bsddialog_geterror());
}
bsddialog_initconf(&conf);
- bsddialog_backtitle(&conf, "FreeBSD Installer");
+ bsddialog_backtitle(&conf, OSNAME " Installer");
for (i = 0; i < ndists; i++) {
urls[i] = malloc(PATH_MAX);
diff --git a/usr.sbin/bsdinstall/partedit/Makefile b/usr.sbin/bsdinstall/partedit/Makefile
--- a/usr.sbin/bsdinstall/partedit/Makefile
+++ b/usr.sbin/bsdinstall/partedit/Makefile
@@ -5,7 +5,7 @@
LINKS= ${BINDIR}/partedit ${BINDIR}/autopart \
${BINDIR}/partedit ${BINDIR}/scriptedpart
SYMLINKS= ../libexec/bsdinstall/partedit /usr/sbin/sade
-CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib
+CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/..
LIBADD+= geom util bsddialog
PARTEDIT_ARCH= ${MACHINE}
diff --git a/usr.sbin/bsdinstall/partedit/part_wizard.c b/usr.sbin/bsdinstall/partedit/part_wizard.c
--- a/usr.sbin/bsdinstall/partedit/part_wizard.c
+++ b/usr.sbin/bsdinstall/partedit/part_wizard.c
@@ -173,7 +173,7 @@
if (n > 1) {
conf.title = "Partitioning";
button = bsddialog_menu(&conf,
- "Select the disk on which to install FreeBSD.", 0, 0, 0,
+ "Select the disk on which to install " OSNAME ".", 0, 0, 0,
n, disks, &selected);
chosen = (button == BSDDIALOG_OK) ?
@@ -259,7 +259,7 @@
conf.button.default_cancel = true;
snprintf(message, sizeof(message), "Would you like to use this entire "
- "disk (%s) for FreeBSD or partition it to share it with other "
+ "disk (%s) for " OSNAME " or partition it to share it with other "
"operating systems? Using the entire disk will erase any data "
"currently stored there.", disk);
conf.title = "Partition";
@@ -275,7 +275,7 @@
sprintf(warning, "The existing partition scheme on this "
"disk (%s) is not bootable on this platform. To install "
- "FreeBSD, it must be repartitioned. This will destroy all "
+ OSNAME ", it must be repartitioned. This will destroy all "
"data on the disk. Are you sure you want to proceed?",
scheme);
conf.title = "Non-bootable Disk";
@@ -362,7 +362,7 @@
humanize_number(neededstr, 7, MIN_FREE_SPACE, "B", HN_AUTOSCALE,
HN_DECIMAL);
sprintf(message, "There is not enough free space on %s to "
- "install FreeBSD (%s free, %s required). Would you like "
+ "install " OSNAME " (%s free, %s required). Would you like "
"to choose another disk or to open the partition editor?",
disk, availablestr, neededstr);
diff --git a/usr.sbin/bsdinstall/partedit/partedit.h b/usr.sbin/bsdinstall/partedit/partedit.h
--- a/usr.sbin/bsdinstall/partedit/partedit.h
+++ b/usr.sbin/bsdinstall/partedit/partedit.h
@@ -35,6 +35,8 @@
#include <inttypes.h>
#include <fstab.h>
+#include "opt_osname.h"
+
struct gprovider;
struct gmesh;
struct ggeom;
diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c
--- a/usr.sbin/bsdinstall/partedit/partedit.c
+++ b/usr.sbin/bsdinstall/partedit/partedit.c
@@ -95,7 +95,7 @@
err(1, "%s", bsddialog_geterror());
bsddialog_initconf(&conf);
if (!sade_mode)
- bsddialog_backtitle(&conf, "FreeBSD Installer");
+ bsddialog_backtitle(&conf, OSNAME " Installer");
i = 0;
/* Revert changes on SIGINT */
@@ -118,7 +118,7 @@
return (error);
}
} else {
- prompt = "Create partitions for FreeBSD, F1 for help.\n"
+ prompt = "Create partitions for " OSNAME ", F1 for help.\n"
"No changes will be made until you select Finish.";
}
@@ -294,7 +294,7 @@
if (root == NULL) {
conf.title = "Error";
bsddialog_msgbox(&conf, "No root partition was found. "
- "The root FreeBSD partition must have a mountpoint "
+ "The root " OSNAME " partition must have a mountpoint "
"of '/'.", 0, 0);
return (false);
}
@@ -308,7 +308,7 @@
conf.title = "Warning";
button = bsddialog_yesno(&conf, "The chosen root partition "
"has a preexisting filesystem. If it contains an existing "
- "FreeBSD system, please update it with freebsd-update "
+ OSNAME " system, please update it with freebsd-update "
"instead of installing a new system on it. The partition "
"can also be erased by pressing \"No\" and then deleting "
"and recreating it. Are you sure you want to proceed?",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 23, 8:49 AM (2 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27878207
Default Alt Text
D34878.diff (6 KB)
Attached To
Mode
D34878: bsdinstall: allow whitelabeling the installer
Attached
Detach File
Event Timeline
Log In to Comment