[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Prevent shutdown with systemctl



On 05/01/16 06:25, Gary Dale wrote:
> Interesting. Why do they behave that way? Hard links don't (but
> replacing the symlink with a hardlink would fail if /bin & /sbin were on
> different devices. Also, I gather that systemctl looks at how it is
> called to determine the action it needs to take - would that create a
> problem if called from a hard link instead of a symlink?).

Well, /bin and /sbin can't be on different devices because the first
thing the kernel executes (unless told to do so otherwise) is
/sbin/init, and if /bin/mount were on a different device, it would not
be accessible.

Classic chicken-egg problem.

These days, even /usr on a different partition is considered a no no, at
least in the Church of udev.

http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken/

As for symlink behaviour, directory entities all occupy inodes, and a
symbolic link is a special type of directory entity whose content points
to another by name.

A hard link is basically a directory entry that, rather than having its
own inode, it shares the same inode as some other directory entity.
It's the directory entity that has the metadata such as file name,
permissions and ownership.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: