Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174354945
D8494.id22134.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8494.id22134.diff
View Options
Index: sys/boot/common/install.c
===================================================================
--- sys/boot/common/install.c
+++ sys/boot/common/install.c
@@ -39,7 +39,6 @@
#include "bootstrap.h"
-extern struct in_addr rootip;
extern struct in_addr servip;
extern int pkgfs_init(const char *, struct fs_ops *);
@@ -50,6 +49,7 @@
static char *inst_kernel;
static char **inst_modules;
static char *inst_rootfs;
+static char *inst_loader_rc;
static int
setpath(char **what, char *val)
@@ -146,6 +146,8 @@
error = setmultipath(&inst_modules, val);
else if (strcmp(tag, "ROOTFS") == 0)
error = setpath(&inst_rootfs, val);
+ else if (strcmp(tag, "LOADER_RC") == 0)
+ error = setpath(&inst_loader_rc, val);
tag = p;
}
@@ -173,6 +175,10 @@
free(inst_rootfs);
inst_rootfs = NULL;
}
+ if (inst_loader_rc != NULL) {
+ free(inst_loader_rc);
+ inst_loader_rc = NULL;
+ }
pkgfs_cleanup();
}
@@ -275,6 +281,16 @@
goto fail;
}
+ /* If there is a loader.rc in the package, execute it */
+ s = (inst_loader_rc == NULL) ? "/loader.rc" : inst_loader_rc;
+ fd = open(s, O_RDONLY);
+ if (fd != -1) {
+ close(fd);
+ error = include(s);
+ if (error == CMD_ERROR)
+ goto fail;
+ }
+
i = 0;
while (inst_modules != NULL && inst_modules[i] != NULL) {
error = mod_loadkld(inst_modules[i], 0, NULL);
@@ -286,7 +302,7 @@
}
s = (inst_rootfs == NULL) ? "/install.iso" : inst_rootfs;
- if (file_loadraw(s, "mfs_root") == NULL) {
+ if (file_loadraw(s, "mfs_root", 1) == NULL) {
error = errno;
command_errmsg = "cannot load root file system";
goto fail;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 3, 3:43 PM (8 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40135829
Default Alt Text
D8494.id22134.diff (1 KB)
Attached To
Mode
D8494: Add Forth script capability and fix compilation of loader install command
Attached
Detach File
Event Timeline
Log In to Comment