You are not logged in.

#1 2023-09-26 12:30:38

ectospasm
Member
Registered: 2015-08-28
Posts: 292

SOLVED/usr/local/sbin symlink to /usr/local/bin replaced by directory

SOLVED:  I added the following to /etc/fstab:

/usr/local/bin /usr/local/sbin none bind 0 0

A sudo mount -a got it mounted, and reinstalling filesystem did not break it!

Original post for posterity:

A few months ago, I followed the pattern of Arch of putting everything in /usr/bin rather than /usr/sbin (the latter is merely a symlink to /usr/bin), but I did it with /usr/local/sbin by moving all my scripts into /usr/local/bin and then setting up sbin as a symlink pointing to bin (relative path symlink sbin -> bin).  This had been working since then, without editing all of my custom services that ran scripts in /usr/local/sbin.  Upon checking my logs this morning (with logwatch), I find that many of my custom services have failed, as /usr/local/sbin is now no longer a symlink, but a standard (empty) directory so my scripts aren't there anymore.

This has happened on several of my personal Arch systems, and I'm wondering what happened, and how to prevent it?  I've upgraded a few times, and this latest one I upgraded this past weekend.  Since new kernels were installed, all of the systems I upgraded were rebooted.  I hadn't checked my logwatch emails since Saturday, September 23, and this appears to have started happening after the latest reboots that day. 

I'm not aware of anything that would do this, but maybe the community can tell me what happened (or why I'm wrong for doing this)?  I'm thinking it may have been systemd, as I think it can run scripts in /usr/local/bin without providing the absolute path in ExecStart=, but the same is not true (or wasn't the last time I looked) for /usr/local/sbin.  But that's my only guess.

Last edited by ectospasm (2023-09-28 23:53:56)

Offline

#2 2023-09-26 12:33:44

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,185

Re: SOLVED/usr/local/sbin symlink to /usr/local/bin replaced by directory

You can't change packaged dirs like this. When you updated the filesystem package, it restored it as-packaged.

Offline

#3 2023-09-26 22:25:44

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,482
Website

Re: SOLVED/usr/local/sbin symlink to /usr/local/bin replaced by directory

I think a bind mount would work here.

Offline

#4 2023-09-27 12:49:38

ectospasm
Member
Registered: 2015-08-28
Posts: 292

Re: SOLVED/usr/local/sbin symlink to /usr/local/bin replaced by directory

Ahh, that makes sense.  I'll try the bind mount and see if that works.  Thanks!

Offline

Board footer

Powered by FluxBB