summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-12-20 16:34:45 +0000
committerjhb <jhb@FreeBSD.org>2003-12-20 16:34:45 +0000
commit4a2ea587fa2330436ebb5a6a4e38e36381922d5d (patch)
tree259c35f9c7cd1369061030b43fb279ee3ca6fe88 /usr.sbin/sade
parent40c79491e2b2ed81eaae7234397e43145aa6afd5 (diff)
downloadFreeBSD-src-4a2ea587fa2330436ebb5a6a4e38e36381922d5d.zip
FreeBSD-src-4a2ea587fa2330436ebb5a6a4e38e36381922d5d.tar.gz
Do an update mount operation to mount the mfsroot as read/write rather
than read/only when sysinstall is running as init. This fixes several install issues.
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/system.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c
index 25ab8b1..906dec2 100644
--- a/usr.sbin/sade/system.c
+++ b/usr.sbin/sade/system.c
@@ -19,13 +19,15 @@
#include "sysinstall.h"
#include <signal.h>
#include <termios.h>
+#include <sys/param.h>
#include <sys/reboot.h>
#include <sys/consio.h>
#include <sys/fcntl.h>
#include <sys/ioctl.h>
+#include <sys/mount.h>
#include <sys/stat.h>
-#include <sys/types.h>
#include <sys/sysctl.h>
+#include <ufs/ufs/ufsmount.h>
/* Where we stick our temporary expanded doc file */
@@ -144,6 +146,7 @@ systemInitialize(int argc, char **argv)
/* Are we running as init? */
if (getpid() == 1) {
+ struct ufs_args ufs_args;
int fd;
RunningAsInit = 1;
@@ -191,6 +194,8 @@ systemInitialize(int argc, char **argv)
#if 0
signal(SIGCHLD, reap_children);
#endif
+ memset(&ufs_args, 0, sizeof(ufs_args));
+ mount("ufs", "/", MNT_UPDATE, &ufs_args);
}
else {
char hname[256];
OpenPOWER on IntegriCloud