commit: cb0069d35d88a952030ddef77047bd8f44ce8354 Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com> AuthorDate: Sun Feb 5 12:22:14 2017 +0000 Commit: David Seifert <soap <AT> gentoo <DOT> org> CommitDate: Sun Feb 5 16:35:45 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb0069d3
sys-apps/preload: remove unused init Closes: https://github.com/gentoo/gentoo/pull/3824 sys-apps/preload/files/preload-0.6.4.init.in | 50 ------------------- sys-apps/preload/files/preload-0.6.4.init.in-r1 | 66 ------------------------- 2 files changed, 116 deletions(-) diff --git a/sys-apps/preload/files/preload-0.6.4.init.in b/sys-apps/preload/files/preload-0.6.4.init.in deleted file mode 100644 index d474afb..00000000 --- a/sys-apps/preload/files/preload-0.6.4.init.in +++ /dev/null @@ -1,50 +0,0 @@ -#!/sbin/openrc-run - -PIDFILE="/var/run/@[email protected]" - -depend() { - after localmount - use netmount ntpd -} - -dump() { - ebegin "Dumping config and state for @PACKAGE@" - kill -USR1 $(<${PIDFILE}) - kill -USR2 $(<${PIDFILE}) - eend $? -} - -reload() { - ebegin "Reloading @PACKAGE@" - kill -HUP $(<${PIDFILE}) - eend $? -} - -start() { - ebegin "Starting @PACKAGE@" - - #MIN_MEMORY=${MIN_MEMORY:-256} - # Check for > MIN_MEMORY MB - #free -m | awk '/Mem:/ {exit ($2 >= ('"$MIN_MEMORY"'))?0:1}' || exit 0 - - # IMPORTANT: Let ssd do the backgrounding so we immediatly get a valid - # pid file in the next step (ionice) - start-stop-daemon --start --quiet --background \ - --make-pidfile --pidfile ${PIDFILE} \ - --exec @sbindir@/@PACKAGE@ -- \ - -l ${PRELOAD_LOGFILE:-/var/log/preload.log} -V ${PRELOAD_VERBOSITY:-1} \ - -n ${PRELOAD_NICE:-15} -s ${PRELOAD_STATEFILE:-""} ${PRELOAD_OPTS} -f - - IONICE=$(which ionice) - if [ -x "$IONICE" ]; then - IONICE_OPTS=${IONICE_OPTS:--c3} - $IONICE ${IONICE_OPTS} -p$(<${PIDFILE}) - fi - eend $? -} - -stop() { - ebegin "Stopping @PACKAGE@ (this may take while)" - start-stop-daemon --stop --retry 120 --quiet --pidfile ${PIDFILE} - eend $? -} diff --git a/sys-apps/preload/files/preload-0.6.4.init.in-r1 b/sys-apps/preload/files/preload-0.6.4.init.in-r1 deleted file mode 100644 index 8ef7a96..00000000 --- a/sys-apps/preload/files/preload-0.6.4.init.in-r1 +++ /dev/null @@ -1,66 +0,0 @@ -#!/sbin/openrc-run - -description='Start/stop the preload daemon' -extra_started_commands='dump reload' -description_dump='Dump the config and state of the daemon (to the logfile)' -description_reload='Reload the daemon' - -PIDFILE="/var/run/preload.pid" - -depend() { - after localmount - use netmount ntpd -} - -dump() { - local pid - pid=$(cat ${PIDFILE}) - - ebegin "Dumping the config and state of preload" - if [ -n "${pid}" ]; then - kill -USR1 ${pid} - kill -USR2 ${pid} - fi - eend ${?} && \ - einfo "These should have been written to ${PRELOAD_LOGFILE:-/var/log/preload.log}" -} - -reload() { - ebegin "Reloading preload" - kill -HUP $(cat ${PIDFILE}) - eend ${?} -} - -start() { - local ionice - - ebegin "Starting preload" - - #MIN_MEMORY=${MIN_MEMORY:-256} - # Check for > MIN_MEMORY MB - #free -m | awk '/Mem:/ {exit ($2 >= ('"$MIN_MEMORY"'))?0:1}' || exit 0 - - # First try to start with ionice; if that fails, try without. - for ionice in "ionice ${IONICE_OPTS:--c3}" ''; do - # Avoid 'ionice not found' errors - ${ionice:-true} >/dev/null 2>&1 || continue - - ${ionice} start-stop-daemon --start --quiet --background \ - --make-pidfile --pidfile ${PIDFILE} \ - --exec /usr/sbin/preload -- \ - -l ${PRELOAD_LOGFILE:-/var/log/preload.log} \ - -V ${PRELOAD_VERBOSITY:-1} \ - -n ${PRELOAD_NICE:-15} \ - -s ${PRELOAD_STATEFILE:-""} \ - ${PRELOAD_OPTS} -f \ - && break - done - - eend ${?} -} - -stop() { - ebegin "Stopping preload (this may take a while)" - start-stop-daemon --stop --retry 120 --quiet --pidfile ${PIDFILE} - eend ${?} -}
