[Slackbuilds-users] rc scripts with -current

Ruben Schuller sb at rbn.im
Fri Jul 16 20:48:01 UTC 2021


2021-07-15 Robby Workman <rworkman at slackbuilds.org>:

> On Mon, 5 Jul 2021 12:12:04 +0200
> Ruben Schuller <sb at rbn.im> wrote:
> 
> > hi!
> > 
> > i'm not sure if this observation is correct (or already was
> > discussed here), but rc scripts may have to be modified for
> > -current as /var/run isn't persistent anymore. a tmpfs is mounted
> > to /run and this in turn is bind mounted to /var/run in rc.S:
> > 
> > 	# If /run exists, mount a tmpfs on it (unless the
> > 	# initrd has already done so):
> > 	if [ -d /run ]; then
> > 	  if ! grep -wq "tmpfs /run tmpfs" /proc/mounts ; then
> > 	    /sbin/mount -v -n -t tmpfs tmpfs /run -o
> > mode=0755,size=32M,nodev,nosuid,noexec fi 
> > 	  # Make sure that mounts below /run are visible in both
> > /run and /var/run: /sbin/mount --make-shared /run
> > 	fi
> > 
> > and
> > 
> > 	# Bind mount /run to /var/run:
> > 	mount -o bind /run /var/run
> > 
> > the rc scripts of daemons included in slackware have been changed
> > accordingly, e.g. rc.bind:
> > 
> > 	bind_start() {
> > 	  # Make sure /var/run/named exists:
> > 	  mkdir -p /var/run/named
> > 
> > some programs may create their directory themselves (like mariadb
> > seems to do), others will complain on startup if it doesn't exist.
> > in any case, installing /var/run/$name via a package is lost after
> > reboot.
> > 
> > i think it usually is enough to just create the directory like it's
> > done in rc.bind.  
> 
> 
> Yes, this issue is quite valid, and the solution isn't always as
> easy as what was done in rc.bind, unfortunately.
> 
> I'm (SLOWLY) working through the ones that I know about and/or 
> the ones that are easily findable with a grep.  
> 
> We'll be happy to review pull requests and/or patches to any of
> them that you happen to notice.
> 
> -RW

Ok, I'll send follow ups with patches for things I've already found!

Ruben


More information about the SlackBuilds-users mailing list