${OPTION_STRACE:+$_STRACE -fF -o /tmp/vserver-start.$$} \
${USE_VNAMESPACE:+$_VNAMESPACE --set -- } \
$_VSPACE --set "${OPTS_VSPACE[@]}" -- \
+ $_EXEC_REMOUNT -- \
$_VLIMIT --dir "$VSERVER_DIR"/rlimits --missingok -- \
$_VSCHED --xid self --force "${OPTS_VSCHED[@]}" -- \
$_VSYSCTL --xid self --dir "$VSERVER_DIR"/sysctl --missingok -- \
src/vtag \
src/vspace \
src/vmemctrl \
- src/tunctl
+ src/tunctl \
+ src/exec-remount
if ENSC_CAN_CRYPTO_WITH_DIETLIBC
DIETPROGS += src/vhashify
src/vsysctl \
src/h2ext \
src/tunctl \
+ src/exec-remount \
$(src_pkglib_C99_X_PROGS) \
$(src_pkglib_CXX_X_PROGS)
src_tunctl_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL)
src_tunctl_LDFLAGS = $(VSERVER_LDFLGS)
+src_exec_remount_SOURCES = src/exec-remount.c
+src_exec_remount_LDADD = $(VSERVER_LDADDS)
+src_exec_remount_LDFLAGS = $(VSERVER_LDFLGS)
+
EXTRA_PROGRAMS += $(src_sbin_CXX_PROGS) $(src_pkglib_CXX_PROGS)
TESTS_ENVIRONMENT += srctestsuitedir=$(top_builddir)/src/testsuite
--- /dev/null
+// $Id$ --*- c -*--
+
+// Copyright (C) 2008 Daniel Hokka Zakrisson
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; version 2 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "util.h"
+
+#include <vserver.h>
+
+#include <getopt.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/mount.h>
+#include <errno.h>
+
+#define ENSC_WRAPPERS_PREFIX "exec-remount: "
+#define ENSC_WRAPPERS_MOUNT 1
+#define ENSC_WRAPPERS_UNISTD 1
+#include <wrappers.h>
+
+#define CMD_HELP 0x1000
+#define CMD_VERSION 0x1001
+
+int wrapper_exit_code = 255;
+
+int main(int argc, char *argv[])
+{
+ int i = 1;
+ if (vc_isSupported(vcFEATURE_PIDSPACE)) {
+ /* FIXME: Get options from etc/mtab
+ * Get list of filesystems from argv
+ */
+ if (umount("proc") == 0)
+ Emount("proc", "proc", "proc", 0, NULL);
+ if (umount("sys") == 0)
+ Emount("sysfs", "sys", "sysfs", 0, NULL);
+ }
+ if (strcmp(argv[i], "--") == 0)
+ i++;
+ EexecvpD(argv[i], argv+i);
+ /* NOTREACHED */
+ return 1;
+}