summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2014-06-13 21:59:42 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2014-06-13 21:59:42 +0000
commitd1a7e4f610d36de57a22158114b9de4dc0f43d37 (patch)
tree79a356acac2742517c696ae0aef7f1204c8a7142 /usr/src/lib
parentacc8b83e4d7b6061c9b23734c3a78cbe327d8e76 (diff)
downloadillumos-joyent-d1a7e4f610d36de57a22158114b9de4dc0f43d37.tar.gz
OS-3101 lxbrand missing /run mount
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/brand/lx/lx_brand/common/mount.c22
-rw-r--r--usr/src/lib/brand/lx/zone/lx_boot_zone_ubuntu.ksh33
2 files changed, 22 insertions, 33 deletions
diff --git a/usr/src/lib/brand/lx/lx_brand/common/mount.c b/usr/src/lib/brand/lx/lx_brand/common/mount.c
index fd06c1e36e..59ae227201 100644
--- a/usr/src/lib/brand/lx/lx_brand/common/mount.c
+++ b/usr/src/lib/brand/lx/lx_brand/common/mount.c
@@ -78,6 +78,10 @@ mount_opt_t lx_proc_options[] = {
{ NULL, MOUNT_OPT_INVALID }
};
+mount_opt_t lx_tmpfs_options[] = {
+ { NULL, MOUNT_OPT_INVALID }
+};
+
mount_opt_t lx_autofs_options[] = {
{ LX_MNTOPT_FD, MOUNT_OPT_UINT },
{ LX_MNTOPT_PGRP, MOUNT_OPT_UINT },
@@ -588,6 +592,22 @@ lx_mount(uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4,
lx_unsupported("unsupported lofs mount options");
return (-ENOTSUP);
}
+ } else if (strcmp(fstype, "tmpfs") == 0) {
+
+ /* Copy in Linux mount options. */
+ if (datap != NULL) {
+ rv = uucopystr((void *)datap,
+ options, sizeof (options));
+ if ((rv == -1) || (rv == sizeof (options)))
+ return (-EFAULT);
+ }
+ lx_debug("\tlinux mount options: \"%s\"", options);
+
+ /* Verify Linux mount options. */
+ if (i_lx_opt_verify(options, lx_tmpfs_options) == 0) {
+ lx_unsupported("unsupported tmpfs mount options");
+ return (-ENOTSUP);
+ }
} else if (strcmp(fstype, "proc") == 0) {
struct stat64 sb;
@@ -616,7 +636,7 @@ lx_mount(uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4,
}
} else if (strcmp(fstype, "autofs") == 0) {
- /* Translate proc mount requests to lx_afs requests. */
+ /* Translate autofs mount requests to lx_afs requests. */
(void) strcpy(fstype, LX_AUTOFS_NAME);
/* Copy in Linux mount options. */
diff --git a/usr/src/lib/brand/lx/zone/lx_boot_zone_ubuntu.ksh b/usr/src/lib/brand/lx/zone/lx_boot_zone_ubuntu.ksh
index 88a81e2981..2fabc77b4a 100644
--- a/usr/src/lib/brand/lx/zone/lx_boot_zone_ubuntu.ksh
+++ b/usr/src/lib/brand/lx/zone/lx_boot_zone_ubuntu.ksh
@@ -152,37 +152,6 @@ end script
DONE
fi
-# XXX use original dbus.conf once /run is mounted as a tmpfs mount and we
-# don't need to cleanup the pid
-
-fnm=$ZONEROOT/etc/init/dbus.conf
-if [[ ! -h $fnm && -f $fnm ]] then
- cat <<'DONE' > $fnm
-description "D-Bus system message bus"
-
-start on local-filesystems
-stop on deconfiguring-networking
-
-expect fork
-respawn
-
-pre-start script
- rm -f /run/dbus/pid
-
- mkdir -p /var/run/dbus
- chown messagebus:messagebus /var/run/dbus
-
- exec dbus-uuidgen --ensure
-end script
-
-exec dbus-daemon --system --fork --activation=upstart
-
-post-start exec kill -USR1 1
-
-post-stop exec rm -f /var/run/dbus/pid
-DONE
-fi
-
# XXX need to add real mounting into this svc definition
fnm=$ZONEROOT/etc/init/mountall.conf
@@ -203,7 +172,7 @@ emits mounted
script
/sbin/initctl emit --no-wait virtual-filesystems
-# mount -F tmpfs swap /run || true
+ /bin/mount -t tmpfs tmpfs /run || true
/sbin/initctl emit --no-wait mounted MOUNTPOINT=/run
/sbin/initctl emit --no-wait local-filesystems
/sbin/initctl emit --no-wait all-swaps