OpenRC: only mount /run if not mounted, check if dirs exist before creating them.
This commit is contained in:
parent
d9dd98aa86
commit
26f8495bf6
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user