summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2005-10-14 18:40:34 +0000
committerBenedikt Boehm <hollow@gentoo.org>2005-10-14 18:40:34 +0000
commit3bff5dc7e3e018e9865b7ff70eaeff250a249824 (patch)
treecae03a059e577c2a55da47a8ba2a2afe41c4973b
parentrename ovz mount utility (diff)
downloadbaselayout-vserver-3bff5dc7e3e018e9865b7ff70eaeff250a249824.tar.gz
baselayout-vserver-3bff5dc7e3e018e9865b7ff70eaeff250a249824.tar.bz2
baselayout-vserver-3bff5dc7e3e018e9865b7ff70eaeff250a249824.zip
rename ovz mount utilrelease-1.12.0_pre9
svn path=/baselayout-vserver/trunk/; revision=59
-rwxr-xr-xmkrelease2
-rwxr-xr-xsbin/init.linux.sh6
-rw-r--r--src/ovz-mount-proc/Makefile33
-rw-r--r--src/ovz-mount-proc/ovz-mount-proc.c (renamed from src/ovz-mount-proc/mount.c)0
4 files changed, 12 insertions, 29 deletions
diff --git a/mkrelease b/mkrelease
index 8f4cdba..881419b 100755
--- a/mkrelease
+++ b/mkrelease
@@ -2,7 +2,7 @@
proj="baselayout-vserver"
svnroot="http://dev.croup.de/repos/${proj}"
-ver=1.13.0
+ver=${1:-1.13.0}
usage() {
echo "Usage: mkrelease"
diff --git a/sbin/init.linux.sh b/sbin/init.linux.sh
index 338f7cb..6c14765 100755
--- a/sbin/init.linux.sh
+++ b/sbin/init.linux.sh
@@ -21,6 +21,12 @@ echo -e "Press ${GOOD}I${NORMAL} to enter interactive boot mode"
echo
check_statedir /proc
+
+# openvz workaround
+# /proc/self exists: we're on linux-vserver
+# /proc/self doesn't exist: we're on openvz
+[[ -e /proc/self ]] || "${svclib}"/ovz-mount-proc
+
check_statedir /dev
source "${svclib}"/sh/init-common-post.sh
diff --git a/src/ovz-mount-proc/Makefile b/src/ovz-mount-proc/Makefile
index 84305c8..0859a49 100644
--- a/src/ovz-mount-proc/Makefile
+++ b/src/ovz-mount-proc/Makefile
@@ -1,39 +1,16 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header$
CC = gcc
LD = gcc
-CFLAGS = -Wall -O2
-DESTDIR =
-LIBDIR = lib
+TARGETS = ovz-mount-proc
-BIN_TARGETS =
-SBIN_TARGETS = mount
-SYS_WHITELIST =
+all: $(TARGETS)
-TARGET = $(BIN_TARGETS) $(SBIN_TARGETS)
-
-OS = Linux
-ifeq ($(OS),Linux)
-LDFLAGS_RS = -ldl
-endif
-ifeq ($(OS),BSD)
-LDFLAGS_SSD = -lkvm
-endif
-
-override CFLAGS += -DLIBDIR=\"$(LIBDIR)\"
-
-all: $(TARGET)
-
-mount: mount.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDFLAGS_SSD)
-
-install: $(TARGET)
- install -m 0755 -d $(DESTDIR)/sbin
- install -m 0755 $(SBIN_TARGETS) $(DESTDIR)/sbin
+ovz-mount-proc: ovz-mount-proc.o
+ $(CC) -static -Wall -o $@ $^
clean:
- rm -f $(TARGET)
+ rm -f $(TARGETS)
rm -f *.o *~
diff --git a/src/ovz-mount-proc/mount.c b/src/ovz-mount-proc/ovz-mount-proc.c
index 866bcf6..866bcf6 100644
--- a/src/ovz-mount-proc/mount.c
+++ b/src/ovz-mount-proc/ovz-mount-proc.c