diff options
author | Dan Armak <danarmak@gentoo.org> | 2001-07-24 08:33:34 +0000 |
---|---|---|
committer | Dan Armak <danarmak@gentoo.org> | 2001-07-24 08:33:34 +0000 |
commit | e88bc29eeb843550e66b2a7517e77d6a54ed4274 (patch) | |
tree | 519a5afb577a1c069ce9447f8f8acff7a3f3a01b /sys-apps/noflushd/files | |
parent | Fix of stupid syntax mistake. Init script should work all the time now. (diff) | |
download | gentoo-2-e88bc29eeb843550e66b2a7517e77d6a54ed4274.tar.gz gentoo-2-e88bc29eeb843550e66b2a7517e77d6a54ed4274.tar.bz2 gentoo-2-e88bc29eeb843550e66b2a7517e77d6a54ed4274.zip |
I *knew* my config system was idiotic! Turns out profile.env vars aren't available in init scripts. Removed /etc/env.d/70noflushd and added a small config file of my own under /etc/noflushd.conf. If anyone already intalled this since yesterday, plesae upgrade and tell me what the new problem is.
Diffstat (limited to 'sys-apps/noflushd/files')
-rw-r--r-- | sys-apps/noflushd/files/70noflushd | 10 | ||||
-rw-r--r-- | sys-apps/noflushd/files/noflushd | 19 | ||||
-rw-r--r-- | sys-apps/noflushd/files/noflushd.conf | 14 |
3 files changed, 30 insertions, 13 deletions
diff --git a/sys-apps/noflushd/files/70noflushd b/sys-apps/noflushd/files/70noflushd deleted file mode 100644 index 333833341c08..000000000000 --- a/sys-apps/noflushd/files/70noflushd +++ /dev/null @@ -1,10 +0,0 @@ -# Settings for the noflushd daemon: - -# Default timeout in minutes to sipn down disk -NOFLUSHD_TIMEOUT=60 - -# Disks to handle -NOFLUSHD_DISKS='/dev/discs/disc0/disc' - -# Run 'noflushd -h' to find out how to set individual timeouts -# for different discs.
\ No newline at end of file diff --git a/sys-apps/noflushd/files/noflushd b/sys-apps/noflushd/files/noflushd index ddf280be20ad..a9b673f35222 100644 --- a/sys-apps/noflushd/files/noflushd +++ b/sys-apps/noflushd/files/noflushd @@ -11,9 +11,21 @@ PIDFILE=/var/run/noflushd.pid EXE=/usr/sbin/noflushd start() { - ebegin "Starting $SERVICE" - start-stop-daemon --start --quiet --exec "$EXE" -- -n $NOFLUSHD_TIMEOUT $NOFLUSHD_DISKS - eend $? "Started $SERVICE." "Error starting $SERVICE." + + # defaults + TIMEOUT=60 + DISKS='/dev/discs/disc0/disc' + EXTRA='' + + # Pull in configuration file if exists, overrides defaults + [ -f /etc/noflushd.conf ] && . /etc/noflushd.conf + + OPTIONS='-n $TIMEOUT $DISKS $EXTRA' + + ebegin "Starting $SERVICE" + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $EXE -- $OPTIONS + eend $? "Started $SERVICE." "Error starting $SERVICE." + } stop() { @@ -24,6 +36,7 @@ stop() { restart() { stop + sleep 1s start } diff --git a/sys-apps/noflushd/files/noflushd.conf b/sys-apps/noflushd/files/noflushd.conf new file mode 100644 index 000000000000..2d2fd841a13b --- /dev/null +++ b/sys-apps/noflushd/files/noflushd.conf @@ -0,0 +1,14 @@ +# /etc/noflushd.conf, settings for the noflushd daemon. +# Part of the Gentoo Linux noflushd package. Dan Armak <danarmak@gentoo.org> + +# Default timeout in minutes to spin down disk +TIMEOUT=60 + +# Disks to handle +DISKS='/dev/discs/disc0/disc' + +# Extra options to pass e.g. individual disk handling options +EXTRA='' + +# Run 'noflushd -h' to find out how to set individual timeouts +# for different discs.
\ No newline at end of file |