mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 15:32:45 +00:00
Better to just statically set the name vs. determine at run time.
This commit is contained in:
parent
e28d949ff4
commit
1ff2ab846d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178946
@ -182,7 +182,7 @@ configFstab(dialogMenuItem *self)
|
||||
else {
|
||||
msgConfirm("Attempting to rebuild your /etc/fstab file. Warning: If you had\n"
|
||||
"any CD devices in use before running %s then they may NOT\n"
|
||||
"be found by this run!", StartName);
|
||||
"be found by this run!", ProgName);
|
||||
}
|
||||
|
||||
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
|
||||
|
@ -1276,7 +1276,7 @@ diskLabel(Device *dev)
|
||||
if (!variable_cmp(DISK_LABELLED, "written")) {
|
||||
msgConfirm("You've already written out your changes - if you\n"
|
||||
"wish to overwrite them, you'll have to restart\n"
|
||||
"%s first.", StartName);
|
||||
"%s first.", ProgName);
|
||||
}
|
||||
else if (!msgNoYes("WARNING: You are about to modify an EXISTING\n"
|
||||
"installation.\n\n"
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <sys/fcntl.h>
|
||||
|
||||
const char *StartName; /* Initial contents of argv[0] */
|
||||
const char *ProgName = "sade";
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
|
@ -278,6 +278,7 @@ extern DMenu MenuMBRType; /* Type of MBR to write on the disk */
|
||||
extern DMenu MenuMain; /* New main menu */
|
||||
extern DMenu MenuDiskDevices; /* Disk type devices */
|
||||
extern const char * StartName; /* Which name we were started as */
|
||||
extern const char * ProgName; /* Program's proper name */
|
||||
|
||||
/* Important chunks. */
|
||||
extern Chunk *HomeChunk;
|
||||
|
@ -233,11 +233,11 @@ systemHelpFile(char *file, char *buf)
|
||||
snprintf(buf, FILENAME_MAX, "/stand/help/%s.TXT", file);
|
||||
if (file_readable(buf))
|
||||
return expand(buf);
|
||||
snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/%s/help/%s.hlp", StartName,
|
||||
snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/%s/help/%s.hlp", ProgName,
|
||||
file);
|
||||
if (file_readable(buf))
|
||||
return buf;
|
||||
snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/%s/help/%s.TXT", StartName,
|
||||
snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/%s/help/%s.TXT", ProgName,
|
||||
file);
|
||||
if (file_readable(buf))
|
||||
return buf;
|
||||
|
@ -238,12 +238,12 @@ dump_variables(dialogMenuItem *unused)
|
||||
Variable *vp;
|
||||
|
||||
if (isDebug())
|
||||
msgDebug("Writing %s variables to file..\n", StartName);
|
||||
msgDebug("Writing %s variables to file..\n", ProgName);
|
||||
|
||||
fp = fopen("/etc/sade.vars", "w");
|
||||
if (!fp) {
|
||||
msgConfirm("Unable to write to /etc/%s.vars: %s",
|
||||
StartName, strerror(errno));
|
||||
ProgName, strerror(errno));
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,7 @@ configFstab(dialogMenuItem *self)
|
||||
else {
|
||||
msgConfirm("Attempting to rebuild your /etc/fstab file. Warning: If you had\n"
|
||||
"any CD devices in use before running %s then they may NOT\n"
|
||||
"be found by this run!", StartName);
|
||||
"be found by this run!", ProgName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1281,7 +1281,7 @@ diskLabel(Device *dev)
|
||||
if (!variable_cmp(DISK_LABELLED, "written")) {
|
||||
msgConfirm("You've already written out your changes - if you\n"
|
||||
"wish to overwrite them, you'll have to restart\n"
|
||||
"%s first.", StartName);
|
||||
"%s first.", ProgName);
|
||||
}
|
||||
else if (!msgNoYes("WARNING: This should only be used when modifying an EXISTING\n"
|
||||
"installation. If you are installing FreeBSD for the first time\n"
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include <sys/resource.h>
|
||||
|
||||
const char *StartName; /* Initial contents of argv[0] */
|
||||
const char *ProgName = "sysinstall";
|
||||
|
||||
static void
|
||||
screech(int sig)
|
||||
|
@ -479,6 +479,7 @@ extern DMenu MenuUsermgmt; /* User management menu */
|
||||
extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */
|
||||
extern int FixItMode; /* FixItMode starts shell on current device (ie Serial port) */
|
||||
extern const char * StartName; /* Which name we were started as */
|
||||
extern const char * ProgName; /* Program's proper name */
|
||||
extern int NCpus; /* # cpus on machine */
|
||||
|
||||
/* Important chunks. */
|
||||
|
@ -365,11 +365,11 @@ systemHelpFile(char *file, char *buf)
|
||||
snprintf(buf, FILENAME_MAX, "/stand/help/%s.TXT", file);
|
||||
if (file_readable(buf))
|
||||
return expand(buf);
|
||||
snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/%s/help/%s.hlp", StartName,
|
||||
snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/%s/help/%s.hlp", ProgName,
|
||||
file);
|
||||
if (file_readable(buf))
|
||||
return buf;
|
||||
snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/%s/help/%s.TXT", StartName,
|
||||
snprintf(buf, FILENAME_MAX, "/usr/src/usr.sbin/%s/help/%s.TXT", ProgName,
|
||||
file);
|
||||
if (file_readable(buf))
|
||||
return buf;
|
||||
|
@ -243,12 +243,12 @@ dump_variables(dialogMenuItem *unused)
|
||||
Variable *vp;
|
||||
|
||||
if (isDebug())
|
||||
msgDebug("Writing %s variables to file..\n", StartName);
|
||||
msgDebug("Writing %s variables to file..\n", ProgName);
|
||||
|
||||
fp = fopen("/etc/sysinstall.vars", "w");
|
||||
if (!fp) {
|
||||
msgConfirm("Unable to write to /etc/%s.vars: %s",
|
||||
StartName, strerror(errno));
|
||||
ProgName, strerror(errno));
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user