openrc/init.d/local.in
William Hubbs 3470eda3f5 Rename runscript to openrc-run
This was requested by Debian, because the minicom software, which is
available on Debian and other distros, has a binary named runscript. We
are keeping a backward compatibility symlink for now, but this allows
Debian or any other distro to safely remove the symlink.

X-Gentoo-Bug: 494220
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=494220
2013-12-29 22:57:31 -06:00

52 lines
1.0 KiB
Plaintext

#!@SBINDIR@/openrc-run
# Copyright (c) 2007-2008 Roy Marples <roy@marples.name>
# Released under the 2-clause BSD license.
description="Executes user programs in @SYSCONFDIR@/local.d"
depend()
{
after *
keyword -timeout
}
start()
{
einfo "Starting local"
local file
for file in @SYSCONFDIR@/local.d/*.start ; do
[ -x "$file" ] && "$file"
done
if command -v local_start >/dev/null 2>&1; then
ewarn "@SYSCONFDIR@/conf.d/local should be removed."
ewarn "Please move the code from the local_start function"
ewarn "to scripts with an .start extension"
ewarn "in @SYSCONFDIR@/local.d"
local_start
fi
eend 0
}
stop()
{
einfo "Stopping local"
local file
for file in @SYSCONFDIR@/local.d/*.stop; do
[ -x "$file" ] && "$file"
done
if command -v local_stop >/dev/null 2>&1; then
ewarn "@SYSCONFDIR@/conf.d/local should be removed."
ewarn "Please move the code from the local_stop function"
ewarn "to scripts with an .stop extension"
ewarn "in @SYSCONFDIR@/local.d"
local_stop
fi
eend 0
}