From 26f8495bf6bdca2b82aa690c51d5ec170db43a7e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 19 Jun 2011 01:19:04 +0200 Subject: [PATCH] OpenRC: only mount /run if not mounted, check if dirs exist before creating them. --- srcpkgs/OpenRC/patches/xbps_changes.diff | 10 +++++----- srcpkgs/OpenRC/template | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/srcpkgs/OpenRC/patches/xbps_changes.diff b/srcpkgs/OpenRC/patches/xbps_changes.diff index 33d79a0792..961e4d13b1 100644 --- a/srcpkgs/OpenRC/patches/xbps_changes.diff +++ b/srcpkgs/OpenRC/patches/xbps_changes.diff @@ -12,7 +12,7 @@ xbps changes: * The mtab service checks if / is of type rootfs and tmpfs, and don't add it into /etc/mtab, which is redundant. * mount_svcdir() doesn't mount any tmpfs or ramfs anymore, rather mounts an - tmpfs in /run and creates a compat symlink for /dev/shm. + tmpfs in /run if not already mounted and creates a compat symlink for /dev/shm. * Backported a patch to skip unmounting the /run mountpoint from upstream git repo (Gentoo). @@ -220,18 +220,18 @@ xbps changes: - echo - return 1 - fi -+ # Mount /run as tmpfs. -+ mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /run ++ # Mount /run as tmpfs if not mounted already. ++ mountinfo -q /run || mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /run - mount -n -t "$fs" $fsopts rc-svcdir "$RC_SVCDIR" - if [ $? -eq 0 ]; then - svcdir_restorecon - [ $? -eq 0 ] && return 0 + for d in init.d udev; do -+ mkdir -m0755 /run/${d} ++ [ ! -d /run/${d} ] && mkdir -m0755 /run/${d} + done + for d in lock tmp shm; do -+ mkdir -m1777 /run/${d} ++ [ ! -d /run/${d} ] && mkdir -m1777 /run/${d} + done + + # Create /dev/shm -> /run/shm compat symlink. diff --git a/srcpkgs/OpenRC/template b/srcpkgs/OpenRC/template index 8f440d716e..60dcea16b3 100644 --- a/srcpkgs/OpenRC/template +++ b/srcpkgs/OpenRC/template @@ -1,7 +1,7 @@ # Template file for 'OpenRC' pkgname=OpenRC version=20110211 -revision=7 +revision=8 wrksrc=openrc-${version} distfiles="http://xbps.nopcode.org/distfiles/openrc-$version.tar.bz2" build_style=custom-install