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
|
* The mtab service checks if / is of type rootfs and tmpfs, and don't add it
|
||||||
into /etc/mtab, which is redundant.
|
into /etc/mtab, which is redundant.
|
||||||
* mount_svcdir() doesn't mount any tmpfs or ramfs anymore, rather mounts an
|
* 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
|
* Backported a patch to skip unmounting the /run mountpoint from upstream
|
||||||
git repo (Gentoo).
|
git repo (Gentoo).
|
||||||
|
|
||||||
|
@ -220,18 +220,18 @@ xbps changes:
|
||||||
- echo
|
- echo
|
||||||
- return 1
|
- return 1
|
||||||
- fi
|
- fi
|
||||||
+ # Mount /run as tmpfs.
|
+ # Mount /run as tmpfs if not mounted already.
|
||||||
+ mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /run
|
+ mountinfo -q /run || mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /run
|
||||||
|
|
||||||
- mount -n -t "$fs" $fsopts rc-svcdir "$RC_SVCDIR"
|
- mount -n -t "$fs" $fsopts rc-svcdir "$RC_SVCDIR"
|
||||||
- if [ $? -eq 0 ]; then
|
- if [ $? -eq 0 ]; then
|
||||||
- svcdir_restorecon
|
- svcdir_restorecon
|
||||||
- [ $? -eq 0 ] && return 0
|
- [ $? -eq 0 ] && return 0
|
||||||
+ for d in init.d udev; do
|
+ for d in init.d udev; do
|
||||||
+ mkdir -m0755 /run/${d}
|
+ [ ! -d /run/${d} ] && mkdir -m0755 /run/${d}
|
||||||
+ done
|
+ done
|
||||||
+ for d in lock tmp shm; do
|
+ for d in lock tmp shm; do
|
||||||
+ mkdir -m1777 /run/${d}
|
+ [ ! -d /run/${d} ] && mkdir -m1777 /run/${d}
|
||||||
+ done
|
+ done
|
||||||
+
|
+
|
||||||
+ # Create /dev/shm -> /run/shm compat symlink.
|
+ # Create /dev/shm -> /run/shm compat symlink.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'OpenRC'
|
# Template file for 'OpenRC'
|
||||||
pkgname=OpenRC
|
pkgname=OpenRC
|
||||||
version=20110211
|
version=20110211
|
||||||
revision=7
|
revision=8
|
||||||
wrksrc=openrc-${version}
|
wrksrc=openrc-${version}
|
||||||
distfiles="http://xbps.nopcode.org/distfiles/openrc-$version.tar.bz2"
|
distfiles="http://xbps.nopcode.org/distfiles/openrc-$version.tar.bz2"
|
||||||
build_style=custom-install
|
build_style=custom-install
|
||||||
|
|
Loading…
Reference in New Issue
Block a user