Project

General

Profile

System Directory Layouts for the GDP

System directories

All shell scripts should begin with the lines:

#!/bin/sh

(test -r /usr/local/etc/gdp.conf.sh && . /usr/local/etc/gdp.conf.sh) ||
        (test -r /etc/gdp.conf.sh && . /etc/gdp.conf.sh)
: ${GDP_ROOT:=/usr}

This allows the value of GDP_ROOT to be tuned as necessary per system, as well as any other configuration variables that may be needed. [Note: we may want to use GDP_ROOT=/usr on some systems.]

$GDP_ROOT should be used for the root of all installations. It should be assumed that it contains a tree with (at a minimum) directories adm, bin, etc, lib, and sbin.

  • $GDP_ROOT/adm is used for administrative support scripts (for example, installation scripts).
  • $GDP_ROOT/bin is used for end-user relevant programs. It should not contain daemons or startup scripts.
  • $GDP_ROOT/etc contains configuration files.
  • $GDP_ROOT/lib contains library files.
  • $GDP_ROOT/sbin contains executables that should only be invoked by system entities (e.g., daemons)

Installation

Files needing customization before installation (e.g., .service files) should be processed by the script $GDP_ROOT/customize.sh during installation. For example:

sh $GDP_ROOT/adm/customize.sh adm/gdplogd.service.template > /etc/systemd/system/gdplogd.service

This script will convert @GDP_ROOT@ to the value of $GDP_ROOT as of installation time. Other customizations may be added in the future.