#69 Move hook scripts from /etc


The login.hook, logout.hook, and radmind.hook scripts are installed in /private/etc/hooks by the Radmind Assistant when it sets up a managed client.

The Filesystem Hierarchy Standard has this to state about /etc:

“The /etc hierarchy contains configuration files. A ’configuration file’ is a local file used to control the operation of a program; it must be static and cannot be an executable binary.”


These files, as executable scripts, should probably move to another location — perhaps into /usr/local/sbin — to adhere to what appears to be the spirit of this standard.


  • Andrew Mortensen

    Logged In: YES
    Originator: NO

    Hooks are not "executable binaries." They're much more like rc scripts, which are most often found in /etc, and hooks, moreover, are compartmentalized within /etc in the hooks directory. Moving the hooks would likely accomplish nothing more than an increase in confusion. I appreciate your desire to conform with standards, but I don't believe having the hooks in a subdirectory of /etc violates anything, particularly given the example of rc scripts. If I were to move hooks anywhere, it would be to something like /Library/Hooks, but that's not likely to happen any time soon.

  • Andrew Mortensen

    • status: open --> closed
  • Jaharmi

    Jaharmi - 2007-11-30

    Logged In: YES
    Originator: YES

    My only counterargument would be the /etc/rc scripts are clearly indispensable on systems where they are needed; /etc/hooks are not.

    While the hooks are not executable binaries, they are executable by necessity. The `periodic` tool in Mac OS X and FreeBSD is an executable script — also not a binary — and yet it is found in /usr/sbin:

    $ which periodic

    I agree there would be some confusion. However, the Radmind admins who tend to care might not be using the stock distribution, and those who are using the stock distribution (I know of no one personally — outside UMich perhaps — who is, so I can't ask them easily) seem unlikely to care where the scripts are located.

    Anyway, it's reasonable to leave them where they are but they might be more discoverable — from a standardization standpoint only — if they were elsewhere, and I'm clearly not sure where that would be.


Log in to post a comment.