mps.servis-yonetimi

This commit is contained in:
milisarge 2017-03-28 05:34:52 +03:00
parent ba64715c4d
commit e71e35c9a5
65 changed files with 5496 additions and 1 deletions

1185
ayarlar/servisler/Makefile Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,59 @@
#!/bin/sh
########################################################################
# Begin acpid
#
# Description : ACPI event daemon boot script
#
# Author : Igor Živković <contact@igor-zivkovic.from.hr>
#
# Version : BLFS SVN
#
########################################################################
### BEGIN INIT INFO
# Provides: acpid
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts Advanced Configuration and Power Interface event daemon
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: igor $
#$Date: 2013-07-10 17:04:20 -0500 (Wed, 10 Jul 2013) $
case "$1" in
start)
log_info_msg "Starting ACPI event daemon..."
start_daemon /usr/sbin/acpid
sleep 1
pidofproc -p "/run/acpid.pid" > /dev/null
evaluate_retval
;;
stop)
log_info_msg "Stopping ACPI event daemon..."
killproc -p "/run/acpid.pid" /usr/sbin/acpid
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/acpid
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End acpid

View File

@ -0,0 +1,51 @@
#!/bin/sh
########################################################################
# Begin alsa
#
# Description : Restore and store ALSA settings
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : BLFS SVN
#
########################################################################
### BEGIN INIT INFO
# Provides: alsa
# Required-Start:
# Should-Start:
# Required-Stop: sendsignals
# Should-Stop:
# Default-Start: S
# Default-Stop: 0 1 6
# Short-Description: Restore and store ALSA mixer settings.
# Description: Restores and stores ALSA mixer settings in the default
# location: /var/lib/alsa/asound.state.
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: igor $
#$Date: 2013-07-25 04:50:36 -0500 (Thu, 25 Jul 2013) $
case "$1" in
start)
log_info_msg "Starting ALSA... Restoring volumes..."
/usr/sbin/alsactl restore
evaluate_retval
;;
stop)
log_info_msg "Stopping ALSA... Saving volumes..."
/usr/sbin/alsactl store
evaluate_retval
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
# End alsa

View File

@ -0,0 +1,61 @@
#!/bin/sh
########################################################################
# Begin atd
#
# Description : Start atd daemon
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.2
#
########################################################################
### BEGIN INIT INFO
# Provides: atd
# Required-Start: $time
# Should-Start:
# Required-Stop:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: atd daemon
# Description: Run jobs queued for later execution
# X-LFS-Provided-By: BLFS / LFS 7.2
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2012-05-09 15:19:23 -0500 (Wed, 09 May 2012) $
case "$1" in
start)
log_info_msg "Starting atd..."
start_daemon /usr/sbin/atd
evaluate_retval
;;
stop)
log_info_msg "Stopping atd..."
killproc /usr/sbin/atd
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/atd
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End atd

View File

@ -0,0 +1,157 @@
#!/bin/bash
########################################################################
# Begin autofs
#
# Description : Start daemon for automounting file systems
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.2
#
# Notes : Updates to autofs distributed start script to make
# compatible with BLFS
#
########################################################################
### BEGIN INIT INFO
# Provides: autofs
# Required-Start: $network ypbind
# Required-Stop: $network ypbind
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Automounts filesystems on demand
# Description: Automounts filesystems on demand
### END INIT INFO
#
# Location of the automount daemon and the init directory
#
DAEMON=/sbin/automount
prog=`basename $DAEMON`
MODULE="autofs4"
DEVICE="autofs"
confdir=/etc/sysconfig
test -e $DAEMON || exit 0
PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH
#
# load customized configuation settings
#
if [ -r $confdir/autofs ]; then
. $confdir/autofs
fi
. /lib/lsb/init-functions
function start() {
log_info_msg "Starting $prog: "
# Make sure autofs4 module is loaded
if ! grep -q autofs /proc/filesystems
then
# Try load the autofs4 module fail if we can't
modprobe $MODULE >/dev/null 2>&1
if [ $? -eq 1 ]
then
log_failure_msg "Error: failed to load autofs4 module."
return 1
fi
elif ([ -f /proc/modules ] && lsmod) | grep -q autofs[^4]
then
# wrong autofs filesystem module loaded
log_failure_msg "Error: autofs kernel module is loaded, autofs4 required"
return 1
fi
# Check misc device
if [ -n "$USE_MISC_DEVICE" -a "x$USE_MISC_DEVICE" = "xyes" ]; then
sleep 1
if [ -e "/proc/misc" ]; then
MINOR=`awk "/$DEVICE/ {print \\$1}" /proc/misc`
if [ -n "$MINOR" -a ! -c "/dev/$DEVICE" ]; then
mknod -m 0600 /dev/$DEVICE c 10 $MINOR
fi
fi
if [ -x /sbin/restorecon -a -c /dev/$DEVICE ]; then
/sbin/restorecon /dev/$DEVICE
fi
else
if [ -c /dev/$DEVICE ]; then
rm /dev/$DEVICE
fi
fi
$prog $OPTIONS
evaluate_retval
}
function stop() {
log_info_msg $"Stopping $prog: "
count=0
while [ -n "`pidof $prog`" -a $count -lt 15 ] ; do
killall -TERM $prog >& /dev/null
RETVAL=$?
[ $RETVAL = 0 -a -z "`pidof $prog`" ] || sleep 3
count=`expr $count + 1`
done
if [ -z "`pidof $prog`" ] ; then
log_success_msg2
else
log_failure_msg2
fi
return $RETVAL
}
function restart() {
stop
start
}
function reload() {
pid=`pidof $prog`
if [ -z $pid ]; then
log_failure_msg2 $"$prog not running"
RETVAL=1
else
kill -HUP $pid 2> /dev/null
log_success_msg2 $"Reloading maps"
RETVAL=0
fi
return $RETVAL
}
RETVAL=0
case "$1" in
start)
start
;;
forcestart)
OPTIONS="$OPTIONS --force"
start
;;
stop)
stop
;;
restart)
restart
;;
forcerestart)
OPTIONS="$OPTIONS --force"
restart
;;
reload)
reload
;;
*)
echo $"Usage: $0 {start|forcestart|stop|restart|forcerestart|reload}"
exit 1;
;;
esac
exit $?

View File

@ -0,0 +1,77 @@
#!/bin/sh
########################################################################
# Begin avahi
#
# Description : Avahi Boot Script
#
# Authors : William Immendorf - will.immendorf@gmail.com
# Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.2
#
########################################################################
### BEGIN INIT INFO
# Provides: avahi
# Required-Start: $syslog $local_fs $network
# Should-Start: $remote_fs
# Required-Stop: $network
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Service discovery on a local network
# Description: Service discovery on a local network
# X-LFS-Provided-By: BLFS / LFS 7.2
### END INIT INFO
. /lib/lsb/init-functions
case "${1}" in
start)
log_info_msg "Starting the Avahi Daemon"
/usr/sbin/avahi-daemon -D
evaluate_retval
log_info_msg "Starting the Avahi mDNS/DNS-SD Configuration Daemon"
/usr/sbin/avahi-dnsconfd -D
evaluate_retval
;;
stop)
log_info_msg "Stopping the Avahi mDNS/DNS-SD Configuration Daemon"
/usr/sbin/avahi-dnsconfd -k
evaluate_retval
log_info_msg "Stopping the Avahi Daemon"
/usr/sbin/avahi-daemon -k
evaluate_retval
;;
reload)
log_info_msg "Reloading the Avahi mDNS/DNS-SD Configuration Daemon"
/usr/sbin/avahi-dnsconfd -r
evaluate_retval
log_info_msg "Reloading the Avahi Daemon"
/usr/sbin/avahi-daemon -r
evaluate_retval
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
statusproc avahi-daemon
statusproc avahi-dnsconfd
;;
*)
echo "Usage: ${0} {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/avahi

View File

@ -0,0 +1,68 @@
#!/bin/sh
########################################################################
# Begin bind
#
# Description : Start Berkeley Internet Name Daemon
#
# Author : DJ Lucas - dj@linuxfromscratch.org
# Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: bind
# Required-Start: $time $network
# Should-Start:
# Required-Stop: $network
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: DNS Daemon
# Description: Provides a local DNS daemon in a chroot environment
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: randy $
#$Date: 2013-02-12 10:13:34 -0600 (Tue, 12 Feb 2013) $
case "$1" in
start)
log_info_msg "Starting named..."
start_daemon /usr/sbin/named -u named -t /srv/named -c /etc/named.conf
evaluate_retval
;;
stop)
log_info_msg "Stopping named..."
killproc /usr/sbin/named
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
reload)
log_info_msg "Reloading named..."
/usr/sbin/rndc -c /etc/rndc.conf reload
evaluate_retval
;;
status)
statusproc /usr/sbin/named
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End /etc/init.d/bind

View File

@ -0,0 +1,139 @@
#!/bin/sh
########################################################################
# Begin bluetooth
#
# Description : BlueZ Boot Script
#
# Authors : Armin K. <krejzi@email.com>
#
# Version : BLFS SVN
#
# Notes : Configurable through /etc/sysconfig/bluetooth
# : Rewritten May 29, 2014 for bluez-5 by
# Bruce Dubbs <bdubbs@linuxfromscratch.org>
#
########################################################################
### BEGIN INIT INFO
# Provides: bluetooth
# Required-Start: $local_fs $syslog dbus
# Required-Stop: $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts bluetooth daemons
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
if [ -f "/etc/sysconfig/bluetooth" ]; then
. /etc/sysconfig/bluetooth
fi
BLUETOOTH=/usr/sbin/bluetoothd
SDPTOOL=/usr/bin/sdptool
HCIATTACH=/usr/bin/hciattach
RFCOMM=/usr/bin/rfcomm
UART_CONF=/etc/bluetooth/uart.conf
RFCOMM_CONF=/etc/bluetooth/rfcomm.conf
start_hci_dev()
{
for dev in ${ACTIVE_HCI_DEVICES_ON_BOOT} ; do
hciconfig $dev up > /dev/null 2>&1
done
}
run_sdptool()
{
# Declaring IFS local in this function, removes the need to
# save/restore it
local IFS option
test -x $SDPTOOL || return 1
IFS=";"
for option in ${SDPTOOL_OPTIONS}; do
IFS=" "
$SDPTOOL $option > /dev/null 2>&1
done
}
start_uarts()
{
[ -x $HCIATTACH ] && [ -f $UART_CONF ] || return
grep -v '^[[:space:]]*(#|$)' $UART_CONF | while read i; do
$HCIATTACH $i > /dev/null 2>&1
done
}
stop_uarts()
{
[ -x $HCIATTACH ] || return
killall $HCIATTACH > /dev/null 2>&1
}
start_rfcomm()
{
[ -x $RFCOMM ] && [ -f $RFCOMM_CONF ] || return
$RFCOMM -f $RFCOMM_CONF bind all > /dev/null 2>&1 || :
}
stop_rfcomm()
{
[ -x $RFCOMM ] || return
$RFCOMM unbind all > /dev/null 2>&1
}
case "${1}" in
start)
log_info_msg "Starting Bluetooth daemon bluetoothd..."
pidlist=`pidofproc $BLUETOOTH`
if [ "${?}" = "0" ]; then
log_info_msg2 " Already running"
log_success_msg2
exit 0;
fi
# Start as background process and assume OK
$BLUETOOTH &
log_success_msg2
start_hci_dev
run_sdptool
start_uarts
start_rfcomm
;;
stop)
stop_rfcomm
stop_uarts
log_info_msg "Stopping Bluetooth daemon bluetoothd..."
killproc $BLUETOOTH
evaluate_retval
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
statusproc $BLUETOOTH
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
exit 0
# End bluetooth

View File

@ -0,0 +1,66 @@
#!/bin/sh
########################################################################
# Begin cups
#
# Description : Start cups daemon
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: cups
# Required-Start: $network
# Should-Start: $remote_fs haldaemon
# Required-Stop: $network
# Should-Stop: haldaemon $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts cups print daemon.
# Description: Starts cups print daemon.
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: dj $
#$Date: 2011-12-05 01:38:40 -0600 (Mon, 05 Dec 2011) $
case $1 in
start)
log_info_msg "Starting CUPS Printserver..."
start_daemon /usr/sbin/cupsd
evaluate_retval
;;
stop)
log_info_msg "Stopping CUPS Printserver..."
killproc /usr/sbin/cupsd
evaluate_retval
;;
reload)
log_info_msg "Reloading CUPS Printserver..."
killproc /usr/sbin/cupsd -HUP
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/cupsd
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/cups

View File

@ -0,0 +1,66 @@
#!/bin/sh
########################################################################
# Begin dbus
#
# Description : Start dbus daemon
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: dbus
# Required-Start: cleanfs
# Should-Start: $remote_fs
# Required-Stop: sendsignals
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts message bus.
# Description: Starts message bus.
# X-LFS-Provided-By: LFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2012-05-02 15:39:55 -0500 (Wed, 02 May 2012) $
pidfile=/run/dbus/pid
socket=/run/dbus/system_bus_socket
case "$1" in
start)
log_info_msg "Starting the D-Bus Messagebus Daemon..."
mkdir -p /run/dbus
/usr/bin/dbus-uuidgen --ensure
start_daemon /usr/bin/dbus-daemon --system
evaluate_retval
;;
stop)
log_info_msg "Stopping the D-Bus Messagebus Daemon..."
killproc /usr/bin/dbus-daemon
evaluate_retval
rm -f $socket $pidfile
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/bin/dbus-daemon
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End /etc/init.d/dbus

View File

@ -0,0 +1,74 @@
#!/bin/sh
########################################################################
# Begin dhcpd
#
# Description : ISC DHCP Server Boot Script.
#
# Author :
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: dhcpd
# Required-Start: network
# Required-Stop: sendsignals
# Default-Start: 2 3 4 5
# Default-Stop: 0 2 6
# Short-Description: Starts the ISC DHCP Server.
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: krejzi $
#$Date: 2013-06-11 10:49:17 -0500 (Tue, 11 Jun 2013) $
INTERFACES=""
OPTIONS=""
if [ -f "/etc/sysconfig/dhcpd" ]; then
. /etc/sysconfig/dhcpd
fi
case "$1" in
start)
if [ -z "$INTERFACES" ]; then
MSG="You need to configure dhcp server in"
log_warning_msg "$MSG /etc/sysconfig/dhcpd"
exit 0
fi
log_info_msg "Starting ISC DHCP Server dhcpd"
start_daemon /usr/sbin/dhcpd -q $INTERFACES $OPTIONS
evaluate_retval
;;
stop)
log_info_msg "Stopping ISC DHCP Server dhcpd"
killproc /usr/sbin/dhcpd
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/dhcpd
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End /etc/init.d/dhcpd

View File

@ -0,0 +1,64 @@
#!/bin/sh
########################################################################
# Begin dovecot
#
# Description : Dovecot server init script
#
# Author : Igor Živković <contact@igor-zivkovic.from.hr>
#
# Version : BLFS SVN
#
########################################################################
### BEGIN INIT INFO
# Provides: dovecot
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Dovecot init script
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy$
#$Date$
case "$1" in
start)
log_info_msg "Starting Dovecot server..."
start_daemon /usr/sbin/dovecot
evaluate_retval
;;
stop)
log_info_msg "Stopping Dovecot server..."
killproc -p "/run/dovecot/master.pid" /usr/sbin/dovecot
evaluate_retval
;;
reload)
log_info_msg "Reloading Dovecot server..."
killproc -p "/run/dovecot/master.pid" /usr/sbin/dovecot -HUP
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/dovecot
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End dovecot

View File

@ -0,0 +1,60 @@
#!/bin/sh
########################################################################
# Begin exim
#
# Description : Starts Postfix Mail Trasfer Agent
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: exim
# Required-Start: $syslog $local_fs $network
# Should-Start: $remote_fs openldap mysql postgresql saslauthd
# Required-Stop: $network
# Should-Stop: $remote_fs openldap mysql postgresql saslauthd
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Exim MTA
# Description: Controls the Exim Mail Transfer Agent
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2012-05-06 23:36:06 -0500 (Sun, 06 May 2012) $
case "$1" in
start)
log_info_msg "Starting Exim..."
start_daemon /usr/sbin/exim -bd -q15m
evaluate_retval
;;
stop)
log_info_msg "Stopping exim..."
killproc /usr/sbin/exim
evaluate_retval
;;
status)
statusproc /usr/sbin/exim
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac
# End /etc/init.d/exim

View File

@ -0,0 +1,53 @@
#!/bin/sh
# Begin /etc/init.d/fcron
### BEGIN INIT INFO
# Provides: fcron
# Required-Start: $local_fs
# Should-Start: $remote_fs $syslog
# Required-Stop: $local_fs
# Should-Stop: $remote_fs $syslog
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts fcron.
# Description: Starts fcron daemon.
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
BIN_FILE="/usr/sbin/fcron"
#$LastChangedBy: bdubbs $
#$Date: 2011-12-05 20:37:16 -0600 (Mon, 05 Dec 2011) $
case "$1" in
start)
log_info_msg "Starting fcron..."
start_daemon ${BIN_FILE}
evaluate_retval
;;
stop)
log_info_msg "Stopping fcron..."
killproc ${BIN_FILE}
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc ${BIN_FILE}
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End /etc/init.d/fcron

View File

@ -0,0 +1,58 @@
#!/bin/sh
########################################################################
# Begin gdm
#
# Description : GDM Boot Script
#
# Authors : Armin K. <krejzi@email.com>
#
# Version : BLFS SVN
#
########################################################################
### BEGIN INIT INFO
# Provides: gdm
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: GNOME Display Manager
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
GDM_BINARY=/usr/sbin/gdm
case "${1}" in
start)
log_info_msg "Starting GNOME Display Manager GDM"
start_daemon ${GDM_BINARY}
evaluate_retval
;;
stop)
log_info_msg "Stopping GNOME Display Manager GDM"
killproc ${GDM_BINARY}
evaluate_retval
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
statusproc ${GDM_BINARY}
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
exit 0
# End gdm

View File

@ -0,0 +1,83 @@
#!/bin/sh
#######################################################################
# Begin /etc/init.d/gpm
#
# Description : Start GPM Console Mouse Service
#
# Author : DJ Lucas - dj@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: gpm
# Required-Start: $network $local_fs
# Should-Start:
# Required-Stop: $local_fs $network
# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts and stops the GPM console mouse service.
# Description: Starts and stops the GPM console mouse service.
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2012-03-23 21:43:45 -0500 (Fri, 23 Mar 2012) $
pidfile="/run/gpm.pid"
[ -f /etc/sysconfig/mouse ] && source /etc/sysconfig/mouse
case "${1}" in
start)
log_info_msg "Starting GPM console mouse service..."
if [ "${MDEVICE}" = "" -o "${PROTOCOL}" = "" ]; then
log_info_msg2 "invalid configuration"
log_failure_msg
exit 2
fi
start_daemon /usr/sbin/gpm -m "${MDEVICE}" -t "${PROTOCOL}" ${GPMOPTS}
evaluate_retval
;;
stop)
log_info_msg "Stopping GPM console mouse service..."
killproc /usr/sbin/gpm
evaluate_retval
;;
force-reload)
# gpm does not honor SIGHUP, restart if running
kill -0 `pidofproc -p "${pidfile}" /usr/sbin/gpm` 2>/dev/null
if [ "${?}" = "0" ]; then
${0} restart
else
log_info_msg "Force reloading GPM console mouse service..."
log_info_msg2 "not running"
log_failure_msg
fi
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
statusproc /usr/sbin/gpm
;;
*)
echo "Usage: ${0} {start|stop|force-reload|restart|status}"
exit 1
;;
esac
exit 0
# End /etc/init.d/gpm

View File

@ -0,0 +1,55 @@
#!/bin/sh
########################################################################
# Begin haveged
#
# Description : Start haveged daemon
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.5
#
########################################################################
### BEGIN INIT INFO
# Provides: haveged
# Required-Start:
# Should-Start:
# Required-Stop:
# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: haveged daemon
# Description: Provide increased entropy to /dev/random
# X-LFS-Provided-By: BLFS / LFS 7.6
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2012-05-09 15:19:23 -0500 (Wed, 09 May 2012) $
case "$1" in
start)
log_info_msg "Starting haveged..."
start_daemon /usr/sbin/haveged
evaluate_retval
;;
stop)
log_info_msg "Stopping haveged..."
killproc /usr/sbin/haveged
evaluate_retval
;;
status)
statusproc /usr/sbin/haveged
;;
*)
echo "Usage: $0 {start|stop|status}"
exit 1
;;
esac
# End haveged

View File

@ -0,0 +1,33 @@
#!/bin/sh
#
# /etc/rc.d/hiawatha: başlatma/durdurma hiawatha web sunucu
#
. /lib/lsb/init-functions
_PID=/var/run/hiawatha.pid
case $1 in
start)
log_info_msg "Hiawatha başlatılıyor..."
/usr/bin/hiawatha
evaluate_retval
;;
stop)
log_info_msg "Hiawatha durduruluyor..."
if [ -f $_PID ]; then
kill `cat $_PID`
else
killall -9 /usr/bin/hiawatha
fi
evaluate_retval
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "Kullanım: $0 [start|stop|restart]"
exit 1
;;
esac

View File

@ -0,0 +1,62 @@
#!/bin/sh
#######################################################################
# Begin /etc/init.d/httpd
#
# Description : Start Apache Web Server
#
# Author : DJ Lucas - dj@linuxfromscratch.org
# Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: httpd
# Required-Start: $syslog $local_fs $network
# Should-Start: $remote_fs
# Required-Stop: $network
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Apache HTTP Server
# Description: Controls the Apache HTTP Daemon
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: krejzi $
#$Date: 2013-01-26 22:28:34 -0600 (Sat, 26 Jan 2013) $
case "$1" in
start)
log_info_msg "Starting Apache HTTP daemon..."
mkdir -p /var/run/httpd
start_daemon /usr/sbin/apachectl -k start
evaluate_retval
;;
stop)
log_info_msg "Stopping Apache HTTP daemon..."
start_daemon /usr/sbin/apachectl -k stop
evaluate_retval
;;
restart)
log_info_msg "Restarting Apache HTTP daemon..."
start_daemon /usr/sbin/apachectl -k restart
evaluate_retval
;;
status)
statusproc /usr/sbin/httpd
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End /etc/init.d/httpd

View File

@ -0,0 +1,84 @@
#!/bin/sh
########################################################################
# Begin iptables
#
# Description : Start iptables
#
# Authors : Ken Moffat - ken@linuxfromscratch.org
# Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: iptables
# Required-Start:
# Should-Start:
# Required-Stop: $local_fs
# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop:
# Short-Description: Loads iptables rules.
# Description: Iptables provides firewall for Linux systems.
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: krejzi $
#$Date: 2013-06-11 11:01:46 -0500 (Tue, 11 Jun 2013) $
case "$1" in
start)
if [ -x /etc/rc.d/rc.iptables ]; then
log_info_msg "Starting iptables..."
/etc/rc.d/rc.iptables
evaluate_retval
fi
;;
lock)
log_info_msg "Locking system iptables firewall..."
/sbin/iptables --policy INPUT DROP
/sbin/iptables --policy OUTPUT DROP
/sbin/iptables --policy FORWARD DROP
/sbin/iptables --flush
/sbin/iptables -t nat --flush
/sbin/iptables -t mangle --flush
/sbin/iptables --delete-chain
/sbin/iptables -t nat --delete-chain
/sbin/iptables -t mangle --delete-chain
/sbin/iptables -A INPUT -i lo -j ACCEPT
/sbin/iptables -A OUTPUT -o lo -j ACCEPT
evaluate_retval
;;
clear)
log_info_msg "Clearing system iptables iptables..."
/sbin/iptables --policy INPUT ACCEPT
/sbin/iptables --policy OUTPUT ACCEPT
/sbin/iptables --policy FORWARD ACCEPT
/sbin/iptables --flush
/sbin/iptables -t nat --flush
/sbin/iptables -t mangle --flush
/sbin/iptables --delete-chain
/sbin/iptables -t nat --delete-chain
/sbin/iptables -t mangle --delete-chain
evaluate_retval
;;
status)
/sbin/iptables --numeric --list
/sbin/iptables -t nat --numeric --list
/sbin/iptables -t mangle --numeric --list
;;
*)
echo "Usage: $0 {start|clear|lock|status}"
exit 1
;;
esac
# End /etc/init.d/iptables

View File

@ -0,0 +1,70 @@
#!/bin/sh
########################################################################
# Begin krb5
#
# Description : MIT Kerberos Boot Script.
#
# Authors : Armin K. <krejzi@email.com>
#
# Version : BLFS SVN
#
# Notes :
#
########################################################################
### BEGIN INIT INFO
# Provides: krb5
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: MIT Kerberos KDC and Admin Server
# Description: Starts, stops or restarts the MIT Kerberos KDC,
# Admin Server and Database Propagation Server.
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
case "${1}" in
start)
log_info_msg "Starting Kerberos KDC krb5kdc"
start_daemon /usr/sbin/krb5kdc
log_info_msg "Starting Kerberos administrative server kadmind"
start_daemon /usr/sbin/kadmind
log_info_msg "Starting Kerberos database propagation server kpropd"
start_daemon /usr/sbin/kpropd -S
evaluate_retval
;;
stop)
log_info_msg "Stopping Kerberos database propagation server kpropd"
killproc /usr/sbin/kpropd
log_info_msg "Stopping Kerberos administrative server kadmind"
killproc /usr/sbin/kadmind
log_info_msg "Stopping Kerberos KDC krb5kdc"
killproc /usr/sbin/krb5kdc
evaluate_retval
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
statusproc /usr/sbin/krb5kdc
statusproc /usr/sbin/kadmind
statusproc /usr/sbin/kpropd
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
exit 0
# End krb5

View File

@ -0,0 +1,67 @@
#!/bin/sh
########################################################################
# Begin lprng
#
# Description : Start lpd daemon
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: lprng
# Required-Start: $local_fs
# Should-Start: $remote_fs
# Required-Stop: $local_fs
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts lpd daemon.
# Description: Starts an implementation of the Berkeley LPR print
# spooler functionality.
# X-LFS-Provided-By: LFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2011-12-05 20:37:16 -0600 (Mon, 05 Dec 2011) $
case "$1" in
start)
log_info_msg "Starting lpd..."
start_daemon /usr/sbin/lpd
evaluate_retval
;;
stop)
log_info_msg "Stopping lpd..."
killproc /usr/sbin/lpd
evaluate_retval
;;
reload)
boot_mesg "Reloading lpd..."
killproc /usr/sbin/lpd -HUP
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/lpd
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/lprng

View File

@ -0,0 +1,53 @@
#!/bin/sh
# Begin /etc/rc.d/init.d/lxdm
### BEGIN INIT INFO
# Provides: lxdm
# Required-Start: $local_fs
# Should-Start: $remote_fs $syslog
# Required-Stop: $local_fs
# Should-Stop: $remote_fs $syslog
# Default-Start: 5
# Default-Stop: 0 1 2 3 4 6
# Short-Description: Starts lxdm.
# Description: Starts lxdm daemon.
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
BIN_FILE="/usr/sbin/lxdm"
#$LastChangedBy: ken $
#$Date: 2014-09-11 17:27:58 -0500 (Thu, 11 Sep 2014) $
case $1 in
start)
log_info_msg "Starting LXDM..."
start_daemon $BIN_FILE -d
evaluate_retval
;;
stop)
log_info_msg "Stopping LXDM..."
killproc $BIN_FILE
evaluate_retval
;;
restart)
$0 stop
sleep 2
$0 start
;;
status)
statusproc ${BIN_FILE}
;;
*)
echo "usage: $0 [start|stop|restart|status]"
exit 1
;;
esac
# End /etc/rc.d/init.d/lxdm

View File

@ -0,0 +1,86 @@
#!/bin/sh
########################################################################
# Begin /etc/init.d/mysql
#
# Description : Start MysSQL Server
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: mysql
# Required-Start: $network
# Should-Start: $remote_fs
# Required-Stop: $network
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts MySQL server.
# Description: Starts MySQL server.
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: igor $
#$Date: 2014-10-11 03:51:32 -0500 (Sat, 11 Oct 2014) $
PIDFILE=/srv/mysql/`/bin/hostname`.pid
case "$1" in
start)
log_info_msg "Starting MySQL daemon..."
# Make sure the mysql user can create a socket
mkdir -p /run/mysqld
chown mysql.mysql /run/mysqld
if [ -f "$PIDFILE" ]; then
if /bin/ps -e | grep `cat $PIDFILE` | grep mysqld >/dev/null ; then
log_warning_msg "\n mysqld already running!"
exit 0
else
rm -f "$PIDFILE"
if [ -f "$PIDFILE" ]; then
log_failure_msg2
exit 1
fi
fi
fi
/usr/bin/mysqld_safe --user=mysql 2>&1 >/dev/null &
evaluate_retval
;;
stop)
log_info_msg "Stopping MySQL daemon..."
killproc -p ${PIDFILE} /usr/sbin/mysqld
evaluate_retval
;;
reload)
log_info_msg "Reloading MySQL ..."
killproc -p ${PIDFILE} /usr/sbin/mysqld -HUP
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/mysqld
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/mysql

View File

@ -0,0 +1,106 @@
#!/bin/sh
########################################################################
# Begin netfs
#
# Description : Mount network filesystems
#
# Author : Nathan Coulson - conathan@conet.dyndns.org
# DJ Lucas - dj@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: $remote_fs
# Required-Start: $network
# Should-Start: nfs-client nfs-server
# Required-Stop: $network
# Should-Stop: nfs-server nfs-client
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Mounts network volumes.
# Description: Mounts anything marked as _netdev, and umounts and mounted
# _netfs, smbfs, ncpfd, coda, or nfs volumes
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2012-04-18 16:56:10 -0500 (Wed, 18 Apr 2012) $
case "$1" in
start)
# The following line mounts all entries in fstab that
# have the _netdev option. This is required for network
# filesystems to be mounted at boot time.
log_info_msg "Mounting network volumes..."
/bin/mount -a -O _netdev
evaluate_retval
;;
stop)
log_info_msg "Unmounting network volumes..."
# The following line obtains a list from the output of
# mount for all netfs types and anything that was
# mounted with the _netdev option.
NETMOUNTS=`/bin/mount \
| /bin/grep '_netdev\|smbfs\|ncpfs\|coda\|nfs\|cifs' \
| /usr/bin/cut -d " " -f 3 | /bin/sed ':a;$!N;s/\n/ /;ta'`
# Check to see if anything was listed from above
# (see if anything is actually needs to be unmounted)
if [ x"$NETMOUNTS" != x ]; then
# There is something mounted
# Try and stop processes the nice way
# (probably won't work in most cases)
/bin/fuser -SIGTERM -km $NETMOUNTS > /dev/null
# Check and see if it found anything. If it
# did, then give 3 seconds for things to exit
# the nice way before killing them off.
# This one will work all of the time!
if [ $? = 0 ]; then
/bin/sleep ${KILLDELAY:-3} # Default is 3, not minus 3
/bin/fuser -km $NETMOUNTS > /dev/null
fi
# We now need to unmount all network filesystems.
# We will do this with two umount commands to allow
# for broken behavior of smbmount, and also to make
# certain that netmounts without the _netdev option
# will still get unmounted.
/bin/umount -af -O _netdev
# Save the return value
NERRVAL=$?
# Now catch the rest of the network filesystems
# by fstype. This list can be extended later as
# more network filesystems are supported by mount.
/bin/umount -af -t coda,ncpfs,nfs,smbfs,nfsd,cifs
if [ $? = 0 -a $NERRVAL = 0 ]; then
(exit 0)
else
(exit 1)
fi
evaluate_retval
else
# There is nothing mounted
log_success_msg2 "No network volumes mounted!"
fi
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
# End /etc/init.d/netfs

View File

@ -0,0 +1,65 @@
#!/bin/sh
########################################################################
# Begin networkmanager
#
# Description : NetworkManager Boot Script
#
# Authors : Armin K. <krejzi@email.com>
#
# Version : BLFS SVN
#
# Notes :
#
########################################################################
### BEGIN INIT INFO
# Provides: networkmanager
# Required-Start: $remote_fs dbus udev
# Required-Stop: $remote_fs dbus udev
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Network connection manager.
# Description: Daemon for automatically switching network
# connections to the best available connection.
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
case "${1}" in
start)
if [ ! -d /var/run/NetworkManager ]; then
install -d -o root -g root -m 755 /var/run/NetworkManager
fi
log_info_msg "Starting network connection manager NetworkManager"
start_daemon /usr/sbin/NetworkManager
evaluate_retval
;;
stop)
log_info_msg "Stopping network connection manager NetworkManager"
killproc /usr/sbin/NetworkManager
evaluate_retval
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
statusproc /usr/sbin/NetworkManager
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
exit 0
# End networkmanager

View File

@ -0,0 +1,61 @@
#!/bin/sh
########################################################################
# Begin nfs-client
#
# Description : Start statd
#
# Authors : Ken Moffat - ken@linuxfromscratch.org
# Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: nfs-client
# Required-Start: rpcbind
# Should-Start:
# Required-Stop: rpcbind
# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts statd
# Description: rpc.statd provides file locking on nfs.
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2015-02-09 15:49:11 -0600 (Mon, 09 Feb 2015) $
case "$1" in
start)
log_info_msg "Starting NFS statd..."
start_daemon /usr/sbin/rpc.statd --no-notify
evaluate_retval
;;
stop)
log_info_msg "Stopping NFS statd..."
killproc /usr/sbin/rpc.statd
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/rpc.statd
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End /etc/init.d/nfs-client

View File

@ -0,0 +1,119 @@
#!/bin/sh
########################################################################
# Begin nfs-server
#
# Description : Start nfs server
#
# Authors : Ken Moffat - ken@linuxfromscratch.org
# Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: nfs-server
# Required-Start: rpcbind
# Should-Start:
# Required-Stop: rpcbind
# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts the nfs server
# Description: Starts the nfs server and exports directories.
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2017-01-27 11:55:21 -0600 (Fri, 27 Jan 2017) $
. /etc/sysconfig/nfs-server
case "$1" in
start)
log_info_msg "Starting NFS statd..."
start_daemon /usr/sbin/rpc.statd --no-notify
evaluate_retval
log_info_msg "Starting NFS nfsd..."
start_daemon /usr/sbin/rpc.nfsd -p $PORT $PROCESSES
evaluate_retval
if [ "$QUOTAS" = "yes" ]; then
log_info_msg "Starting NFS rquotad..."
start_daemon /usr/sbin/rpc.rquotad
evaluate_retval
fi
log_info_msg "Starting NFS mountd..."
start_daemon /usr/sbin/rpc.mountd
evaluate_retval
# Make certain that the list is refreshed on a restart.
log_info_msg "Exporting NFS Filesystems..."
/usr/sbin/exportfs -ra 2>&1 > /dev/null
evaluate_retval
;;
stop)
log_info_msg "Removing NFS Exported Filesystems..."
/usr/sbin/exportfs -au 2>&1 > /dev/null
evaluate_retval
if [ "$QUOTAS" = "yes" ]; then
log_info_msg "Stopping NFS rquotad..."
killproc /usr/sbin/rpc.rquotad
evaluate_retval
fi
log_info_msg "Stopping NFS statd..."
killproc /usr/sbin/rpc.statd
evaluate_retval
log_info_msg "Stopping NFS nfsd..."
# nfsd needs HUP. Can't use killproc for kernel process.
killall -HUP nfsd
evaluate_retval
log_info_msg "Stopping NFS mountd..."
killproc /usr/sbin/rpc.mountd
evaluate_retval
# Remove a pid file that isn't done automatically
if [ -f /var/run/rpc.statd.pid ]; then
log_success_msg "Removing the rpc.statd pid file if it exists"
rm -f /var/run/rpc.statd.pid
fi
;;
reload)
log_info_msg "Reloading NFS Server..."
/usr/sbin/exportfs -ra
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/rpc.mountd
## Special case for nfsd with no full path
statusproc nfsd
statusproc /usr/sbin/rpc.statd
if [ "$QUOTAS" = "yes" ]; then
statusproc rpc.rquotad
fi
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/nfs-server

View File

@ -0,0 +1,62 @@
#!/bin/sh
########################################################################
# Begin ntpd
#
# Description : Start Network Time Protocol daemon
#
# Author : DJ Lucas - dj@linuxfromscratch.org
# Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: ntpd
# Required-Start: $time $network
# Should-Start: $remote_fs
# Required-Stop: $network
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: NTP Network Time Protocol
# Description: NTP Syncronizes time with time servers worldwide
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: igor $
#$Date: 2013-08-02 15:27:17 -0500 (Fri, 02 Aug 2013) $
case "$1" in
start)
log_info_msg "Starting ntpd..."
start_daemon /usr/sbin/ntpd -g -u ntp:ntp
evaluate_retval
;;
stop)
log_info_msg "Stopping ntpd..."
killproc /usr/sbin/ntpd
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/ntpd
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End ntpd

View File

@ -0,0 +1,132 @@
#! /bin/sh
#######################################################################
# Begin /etc/init.d/php-fpm
#
# Description : Start the PHP fastCGI Proces Manager
#
# Author : P Labastie - pierre.labastie@neuf.fr
# from a file shipped with the PHP pacakge
#
# Version : LFS 7.5
#
########################################################################
### BEGIN INIT INFO
# Provides: php-fpm
# Required-Start: $syslog $local_fs $network
# Should-Start: $remote_fs
# Required-Stop: $network
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: starts php-fpm
# Description: starts the PHP FastCGI Process Manager daemon
# X-LFS-Provided-By: BLFS / LFS 7.5
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: pierre $
#$Date: 2014-03-29 04:48:53 -0500 (Sat, 29 Mar 2014) $
prefix=/usr
exec_prefix=${prefix}
php_fpm_BIN=${exec_prefix}/sbin/php-fpm
php_fpm_CONF=/etc/php-fpm.conf
php_fpm_PID=/var/run/php-fpm.pid
php_opts="--fpm-config $php_fpm_CONF --pid $php_fpm_PID"
wait_for_pid () {
try=0
while test $try -lt 35 ; do
case "$1" in
'created')
if [ -f "$2" ] ; then
try=''
break
fi
;;
'removed')
if [ ! -f "$2" ] ; then
try=''
break
fi
;;
esac
echo -n .
try=`expr $try + 1`
sleep 1
done
}
case "$1" in
start)
log_info_msg "Starting PHP fastCGI Process Manager..."
start_daemon $php_fpm_BIN --daemonize $php_opts
if [ "$?" != 0 ] ; then
log_failure_msg2
exit
fi
wait_for_pid created $php_fpm_PID
if [ -n "$try" ] ; then
log_failure_msg2
else
log_success_msg2
fi
;;
stop)
log_info_msg "Stopping PHP fastCGI Process Manager..."
if [ ! -r $php_fpm_PID ] ; then
log_warning_msg "php-fpm not running?"
exit
fi
killproc -p $php_fpm_PID $php_fpm_BIN -QUIT
wait_for_pid removed $php_fpm_PID
if [ -n "$try" ] ; then
log_failure_msg2
else
log_success_msg2
fi
;;
status)
statusproc $php_fpm_BIN
;;
restart)
$0 stop
$0 start
;;
reload)
log_info_msg "Reload service php-fpm..."
killproc -p $php_fpm_PID $php_fpm_BIN -USR2
log_success_msg2
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
;;
esac

View File

@ -0,0 +1,71 @@
#!/bin/sh
########################################################################
# Begin postfix
#
# Description : Starts Postfix Mail Trasfer Agent
#
# Author : DJ Lucas - dj@linuxfromscratch.org
# Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: postfix
# Required-Start: $syslog $local_fs $network
# Should-Start: $remote_fs openldap mysql postgresql saslauthd
# Required-Stop: $network
# Should-Stop: $remote_fs openldap mysql postgresql saslauthd
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Postfix MTA
# Description: Controls the Postfix Mail Transfer Agent
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: krejzi $
#$Date: 2013-01-25 12:12:00 -0600 (Fri, 25 Jan 2013) $
BINFILE=/usr/lib/postfix/master
PIDFILE=/var/spool/postfix/pid/master.pid
case "$1" in
start)
log_info_msg "Starting Postfix..."
start_daemon -p "${PIDFILE}" /usr/sbin/postfix start 2> /dev/null
evaluate_retval
;;
stop)
log_info_msg "Stopping Postfix..."
killproc -p "${PIDFILE}" ${BINFILE}
evaluate_retval
;;
reload)
log_info_msg "Reloading Postfix..."
killproc -p "${PIDFILE}" ${BINFILE} -HUP
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
echo -n "postfix: "
statusproc -p "${PIDFILE}" ${BINFILE}
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/postfix

View File

@ -0,0 +1,66 @@
#!/bin/sh
########################################################################
# Begin /etc/init.d/postgresql
#
# Description : Start PostgreSQL Server
#
# Author : Ken Moffat - ken@linuxfromscratch.org
#
# Version : LFS 7.0
#
# Notes : Based on the earlier version by Gerard Beekmans
#
########################################################################
### BEGIN INIT INFO
# Provides: PostgreSQL
# Required-Start: $network
# Should-Start: $remote_fs
# Required-Stop: $network
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts PostgreSQL server.
# Description: Starts PostgreSQL server.
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: krejzi $
#$Date: 2013-05-12 11:47:06 -0500 (Sun, 12 May 2013) $
case "$1" in
start)
log_info_msg "Starting PostgreSQL daemon..."
install -dm755 -o postgres -g postgres /run/postgresql
su - postgres -c '/usr/bin/pg_ctl start -W -D /srv/pgsql/data \
-l /srv/pgsql/data/logfile -o "-i" '
evaluate_retval
;;
stop)
log_info_msg "Stopping PostgreSQL daemon..."
su - postgres -c "/usr/bin/pg_ctl stop -m smart -D /srv/pgsql/data"
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
su - postgres -c "/usr/bin/pg_ctl status -D /srv/pgsql/data"
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End /etc/init.d/postgresql

View File

@ -0,0 +1,66 @@
#!/bin/sh
########################################################################
# Begin /etc/init.d/vsftpd
#
# Description : Start Pro FTP Daemon
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.2
#
########################################################################
### BEGIN INIT INFO
# Provides: ftpd
# Required-Start: $remote_fs
# Should-Start:
# Required-Stop: $remote_fs
# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts proftpd server.
# Description: Starts Professional FTP Daemon (proftpd).
# X-LFS-Provided-By: LFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2012-04-21 17:07:20 -0500 (Sat, 21 Apr 2012) $
case "$1" in
start)
log_info_msg "Starting FTP Server..."
start_daemon /usr/sbin/proftpd
evaluate_retval
;;
stop)
log_info_msg "Stopping FTP Server..."
killproc /usr/sbin/proftpd
evaluate_retval
;;
reload)
log_info_msg "Reloading FTP Server..."
killproc /usr/sbin/proftpd -HUP
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/proftpd
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/proftpd

View File

@ -0,0 +1,67 @@
#!/bin/sh
########################################################################
# Begin /etc/init.d/qpopper
#
# Description : Provide Post Office Protocol (POP3) services
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.2
#
########################################################################
### BEGIN INIT INFO
# Provides: qpopper
# Required-Start: $syslog $local_fs $network
# Should-Start:
# Required-Stop: $network
# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts qpopper (POP3) process.
# Description: Starts qpopper (POP3) process.
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2012-04-18 21:23:42 -0500 (Wed, 18 Apr 2012) $
CONFIG=/etc/mail/qpopper.conf
QPOPPER=/usr/sbin/popper
#PORT=110
[ -x $QPOPPER ] || exit 0
case "$1" in
start)
log_info_msg "Starting Qpopper daemon..."
if [ ! -f $CONFIG ]; then
log_failure_msg2 "$CONFIG missing!"
exit 1
fi
start_daemon $QPOPPER $PORT -f $CONFIG
evaluate_retval
;;
stop)
log_info_msg "Stopping Qpopper..."
killproc $QPOPPER
evaluate_retval
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
# End /etc/init.d/qpopper

View File

@ -0,0 +1,55 @@
#!/bin/sh
########################################################################
# Begin random
#
# Description : Seed /dev/urandom
#
# Author : Larry Lawrence
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: random
# Required-Start: $local_fs
# Should-Start:
# Required-Stop: $local_fs
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Initialises /dev/urandom
# Description: Initialises /dev/urandom from a seed stored in /var/tmp.
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2011-12-05 23:56:33 -0600 (Mon, 05 Dec 2011) $
case "$1" in
start)
log_info_msg "Initializing kernel random number generator..."
if [ -f /var/tmp/random-seed ]; then
/bin/cat /var/tmp/random-seed >/dev/urandom
fi
/bin/dd if=/dev/urandom of=/var/tmp/random-seed count=1 &>/dev/null
evaluate_retval
;;
stop)
log_info_msg "Saving random seed..."
/bin/dd if=/dev/urandom of=/var/tmp/random-seed count=1 &>/dev/null
evaluate_retval
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
# End /etc/init.d/random

View File

@ -0,0 +1,66 @@
#!/bin/sh
########################################################################
# Begin rpcbind
#
# Description : Start rpcbind daemon
#
# Author : Ken Moffat - ken@linuxfromscratch.org, based on portmap
# script by Bruce Dubbs
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: rpcbind $portmap
# Required-Start: $network
# Should-Start:
# Required-Stop: $network
# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts the rpcbind daemon.
# Description: Starts the rpcbind daemon to convert RPC program numbers
# into DARPA protocol port numbers. It must be running in
# order to make RPC# calls. Replaces portmap, which does
# not work with libtirpc.
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: dj $
#$Date: 2011-12-05 01:38:40 -0600 (Mon, 05 Dec 2011) $
case "$1" in
start)
log_info_msg "Starting rpcbind"
start_daemon /sbin/rpcbind
evaluate_retval
;;
stop)
log_info_msg "Stopping rpcbind"
killproc /sbin/rpcbind
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /sbin/rpcbind
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End /etc/init.d/rpcbind

View File

@ -0,0 +1,61 @@
#!/bin/sh
#######################################################################
# Begin /etc/init.d/rsyncd
#
# Description : Start rsync server
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: rsyncd
# Required-Start: $syslog $local_fs $network
# Should-Start: $remote_fs
# Required-Stop: $network
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts rsync daemon.
# Description: Starts rsync daemon which is used to copy
# files from and to remote machines.
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: krejzi $
#$Date: 2012-08-28 10:06:39 -0500 (Tue, 28 Aug 2012) $
case "$1" in
start)
log_info_msg "Starting RSYNC Server..."
start_daemon /usr/bin/rsync --daemon
evaluate_retval
;;
stop)
log_info_msg "Stopping RSYNC Server..."
killproc /usr/bin/rsync
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/bin/rsync
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End /etc/init.d/rsyncd

View File

@ -0,0 +1,73 @@
#!/bin/sh
# Begin /etc/init.d/samba
### BEGIN INIT INFO
# Provides: samba
# Required-Start: $network
# Should-Start: $remote_fs cups slapd ntpd
# Required-Stop: $network
# Should-Stop: $remote_fs cups slapd ntpd
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Provides SMB (Windows) networking.
# Description: Starts Samba smbd and nmbd processess which provide
# connectivity to SMB (Windows) networks.
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: krejzi $
#$Date: 2013-03-10 16:07:50 -0500 (Sun, 10 Mar 2013) $
case "$1" in
start)
mkdir -p /run/samba
log_info_msg "Starting nmbd..."
start_daemon /usr/sbin/nmbd -D
evaluate_retval
log_info_msg "Starting smbd..."
start_daemon /usr/sbin/smbd -D
evaluate_retval
;;
stop)
log_info_msg "Stopping smbd..."
killproc /usr/sbin/smbd
evaluate_retval
log_info_msg "Stopping nmbd..."
killproc /usr/sbin/nmbd
evaluate_retval
;;
reload)
log_info_msg "Reloading smbd..."
killproc /usr/sbin/smbd -HUP
evaluate_retval
log_info_msg "Reloading nmbd..."
killproc /usr/sbin/nmbd -HUP
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/nmbd
statusproc /usr/sbin/smbd
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/samba

View File

@ -0,0 +1,84 @@
#!/bin/sh
########################################################################
# Begin saslauthd
#
# Description : Cyrus SASL Boot Script
#
# Authors : Armin K. <krejzi@email.com>
#
# Version : BLFS SVN
#
# Notes : Not enabled by default.
#
########################################################################
### BEGIN INIT INFO
# Provides: saslauthd
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: saslauthd startup script
# Description: This script starts the saslauthd daemon. It is
# configured using the file /etc/sysconfig/saslauthd.
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
START="no"
AUTHMECH=""
OPTIONS=""
if [ -f "/etc/sysconfig/saslauthd" ]; then
. /etc/sysconfig/saslauthd
fi
case "${1}" in
start)
if [ "$START" != "yes" ]; then
MSG="Configure saslauthd in /etc/sysconfig/saslauthd"
log_warning_msg "$MSG and set START to yes"
exit 0
fi
if [ -z "$AUTHMECH" ]; then
MSG="You need to select auth mechanism in"
log_warning_msg "$MSG /etc/sysconfig/saslauthd"
exit 0
fi
if [ ! -d /var/run/saslauthd ]; then
install -d -o root -g root -m 711 /var/run/saslauthd
fi
log_info_msg "Starting SASL Authentication Daemon saslauthd"
start_daemon /usr/sbin/saslauthd -a $AUTHMECH $OPTIONS
evaluate_retval
;;
stop)
log_info_msg "Stopping SASL Authentication Daemon saslauthd"
killproc /usr/sbin/saslauthd
evaluate_retval
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
statusproc /usr/sbin/saslauthd
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
exit 0
# End saslauthd

View File

@ -0,0 +1,53 @@
#!/bin/sh
# Begin /etc/rc.d/init.d/sddm
### BEGIN INIT INFO
# Provides: sddm
# Required-Start: $local_fs
# Should-Start: $remote_fs $syslog
# Required-Stop: $local_fs
# Should-Stop: $remote_fs $syslog
# Default-Start: 5
# Default-Stop: 0 1 2 3 4 6
# Short-Description: Starts sddm.
# Description: Starts sddm daemon.
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
BIN_FILE="/usr/bin/sddm"
#$LastChangedBy: fernando $
#$Date: 2015-09-24 20:29:34 -0500 (Thu, 24 Sep 2015) $
case $1 in
start)
log_info_msg "Starting SDDM..."
start_daemon $BIN_FILE &
evaluate_retval
;;
stop)
log_info_msg "Stopping SDDM..."
killproc $BIN_FILE
evaluate_retval
;;
restart)
$0 stop
sleep 2
$0 start
;;
status)
statusproc ${BIN_FILE}
;;
*)
echo "usage: $0 [start|stop|restart|status]"
exit 1
;;
esac
# End /etc/rc.d/init.d/sddm

View File

@ -0,0 +1,57 @@
#!/bin/sh
########################################################################
# Begin sendmail
#
# Description : Starts Sendmail Mail Trasfer Agent
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.2
#
########################################################################
### BEGIN INIT INFO
# Provides: sendmail
# Required-Start: $syslog $local_fs $network
# Should-Start: $remote_fs openldap mysql postgresql saslauthd
# Required-Stop: $network
# Should-Stop: $remote_fs openldap mysql postgresql saslauthd
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Sendmail MTA
# Description: Controls the Sendmail Mail Transfer Agent
# X-LFS-Provided-By: BLFS / LFS 7.2
### END INIT INFO
. /lib/lsb/init-functions
case "$1" in
start)
log_info_msg "Starting sendmail..."
start_daemon /usr/sbin/sendmail -bs -bd -q5m start
evaluate_retval
;;
stop)
log_info_msg "Stopping Sendmail..."
killproc /usr/sbin/sendmail
evaluate_retval
;;
status)
statusproc /usr/sbin/sendmail
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac
# End /etc/init.d/sendmail

View File

@ -0,0 +1,74 @@
#!/bin/sh
########################################################################
# Begin slapd
#
# Description : OpenLDAP Boot Script
#
# Authors : Armin K. <krejzi@email.com>
#
# Version : BLFS SVN
#
# Notes : Can be configured through /etc/sysconfig/slapd.
#
########################################################################
### BEGIN INIT INFO
# Provides: slapd
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 3 4 5
# Default-Stop: 0 1 6
# Short-Description: OpenLDAP standalone server
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
SLAPD_OPTIONS=""
if [ -f "/etc/sysconfig/slapd" ]; then
. /etc/sysconfig/slapd
fi
case "${1}" in
start)
if [ ! -d /var/run/openldap ]; then
install -d -o ldap -g ldap -m 755 /var/run/openldap
fi
log_info_msg "Starting OpenLDAP"
if [ -z "$SLAPD_SERVICES" ]; then
start_daemon /usr/sbin/slapd -u ldap -g ldap $SLAPD_OPTIONS
else
start_daemon /usr/sbin/slapd -u ldap -g ldap -h "$SLAPD_SERVICES" $SLAPD_OPTIONS
fi
evaluate_retval
;;
stop)
log_info_msg "Stopping OpenLDAP"
killproc /usr/sbin/slapd
evaluate_retval
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
statusproc /usr/sbin/slapd
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
exit 0
# End slapd

View File

@ -0,0 +1,79 @@
#! /bin/sh
# smartmontools init file for smartd
### BEGIN INIT INFO
# Provides: smartd
# Required-Start: $syslog $remote_fs
# Should-Start: sendmail
# Required-Stop: $syslog $remote_fs
# Should-Stop: sendmail
# Default-Start: 2 3 5
# Default-Stop:
# Short-Description: Monitors disk and tape health via S.M.A.R.T.
# Description: Start S.M.A.R.T. disk and tape monitor.
### END INIT INFO
source /lib/lsb/init-functions
# Source configuration file. This should define the shell variable smartd_opts
[ -r /etc/sysconfig/smartmontools ] && . /etc/sysconfig/smartmontools
SMARTD_BIN=/usr/sbin/smartd
pidfile=/run/lock/smartd
config=/etc/smartd.conf
case "$1" in
start)
log_info_msg "Starting smartd... "
if [ ! -f $config ]; then
log_info_msg2 "configuration file $config missing"
failed=1
elif start_daemon $SMARTD_BIN $smartd_opts; then
touch $pidfile
else
failed=1
fi
(exit $failed)
evaluate_retval
;;
stop)
log_info_msg "Stopping smartd... "
killproc $SMARTD_BIN
evaluate_retval
rm -f $pidfile
;;
report)
log_info_msg "Checking SMART devices now... "
killproc $SMARTD_BIN -USR1
evaluate_retval
;;
reload)
log_info_msg "Reloading smartd daemon configuration... "
killproc $SMARTD_BIN -HUP
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc $SMARTD_BIN
;;
*)
echo "Usage: $0 {start|stop|report|reload|restart|status}"
exit 1
;;
esac

View File

@ -0,0 +1,67 @@
#!/bin/sh
########################################################################
# Begin soprano
#
# Description :
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.2
#
########################################################################
### BEGIN INIT INFO
# Provides: sopranod
# Required-Start: $syslog $local_fs $network
# Should-Start: $remote_fs
# Required-Stop: $network
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Controls the soprano (QRDF) daemon
# Description: Controls the soprano (QRDF) daemon
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
[ -r /etc/sysconfig/soprano ] && . /etc/sysconfig/soprano
case "$1" in
start)
log_info_msg "Starting Soprano Server..."
HOME=$SOPRANO_STORAGE /usr/bin/sopranod \
--storagedir $SOPRANO_STORAGE \
--backend $SOPRANO_BACKEND \
$SOPRANO_OPTIONS &
evaluate_retval
;;
stop)
log_info_msg "Stopping Soprano Server..."
killproc /usr/bin/sopranod
evaluate_retval
;;
reload)
log_info_msg "Reloading Soprano Server..."
killproc /usr/bin/sopranod -HUP
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/bin/sopranod
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/soprano

View File

@ -0,0 +1,77 @@
#!/bin/sh
########################################################################
# Begin sshd
#
# Description : Start sshd daemon
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: sshd
# Required-Start: $network
# Should-Start:
# Required-Stop: sendsignals
# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts sshd daemon.
# Description: Starts sshd daemon.
# X-LFS-Provided-By: LFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: dj $
#$Date: 2012-06-18 18:42:28 -0500 (Mon, 18 Jun 2012) $
case "$1" in
start)
log_info_msg "Starting SSH Server..."
start_daemon -f /usr/sbin/sshd
evaluate_retval
# Also prevent ssh from being killed by out of memory conditions
sleep 1
pid=`cat /run/sshd.pid 2>/dev/null`
echo "-16" >/proc/${pid}/oom_score_adj
;;
stop)
log_info_msg "Stopping SSH Server..."
killproc -p "/run/sshd.pid" /usr/sbin/sshd
evaluate_retval
;;
reload)
log_info_msg "Reloading SSH Server..."
pid=`cat /run/sshd.pid 2>/dev/null`
if [ -n "${pid}" ]; then
kill -HUP "${pid}"
else
(exit 1)
fi
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/sshd
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End sshd bootscript

View File

@ -0,0 +1,55 @@
#!/bin/sh
# Begin /etc/init.d/stunnel
### BEGIN INIT INFO
# Provides: samba
# Required-Start: $network
# Should-Start: $remote_fs
# Required-Stop: $network
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Provides an SSL encryption wrapper.
# Description: Provides an SSL encryption wrapper between remote clients and
# local (inetd-startable) or remote servers. The concept is that
# having non-SSL aware daemons running on your system you can
# easily set them up to communicate with clients over secure SSL
# channels.
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2011-11-11 22:33:41 -0600 (Fri, 11 Nov 2011) $
case "$1" in
start)
log_info_msg "Starting the Stunnel Daemon..."
start_daemon /usr/bin/stunnel
evaluate_retval
;;
stop)
log_info_msg "Stopping the Stunnel Daemon..."
killproc /usr/bin/stunnel
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/bin/stunnel
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End /etc/init.d/stunnel

View File

@ -0,0 +1,60 @@
#!/bin/sh
########################################################################
# Begin /etc/init.d/svn
#
# Description : Start Subversion server
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: svn
# Required-Start: $network
# Should-Start: $remote_fs
# Required-Stop: $network
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts subersion server.
# Description: Starts subversion version control system server daemon.
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2011-12-05 20:37:16 -0600 (Mon, 05 Dec 2011) $
case "$1" in
start)
log_info_msg "Starting Subversion..."
start_daemon /usr/bin/svnserve -d -r /srv/svn/repositories
evaluate_retval
;;
stop)
log_info_msg "Stopping Subversion..."
killproc /usr/bin/svnserve.orig
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/bin/svnserve.orig
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End /etc/init.d/svn

View File

@ -0,0 +1,62 @@
#!/bin/sh
# Begin /etc/init.d/swat
### BEGIN INIT INFO
# Provides: swat
# Required-Start: $network
# Should-Start: $remote_fs
# Required-Stop: $network
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Provides Samba configuration tool
# Description: Starts Samba configuration tool over a secure
# tunnel;
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2012-04-20 21:17:24 -0500 (Fri, 20 Apr 2012) $
config=/etc/stunnel/swat.conf
if [ ! -r /etc/stunnel/swat.conf ]; then
log_failure_msg "swat configuration file missing: $config"
exit 1
fi
# Pid coordinates with /etc/stunnel/swat.conf
pidfile=/run/stunnel-swat.pid
case "$1" in
start)
log_info_msg "Starting swat..."
start_daemon /usr/bin/stunnel $config
evaluate_retval
;;
stop)
log_info_msg "Stopping swat..."
killproc -p $pidfile /usr/bin/stunnel
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc -p $pidfile /usr/bin/stunnel
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End /etc/init.d/samba

View File

@ -0,0 +1,45 @@
#!/bin/sh
# Begin /etc/init.d/sysstat
########################################################################
# Begin ntpd
#
# Description : Clear kernel counters for sysstat
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: Reset of system activity data collector file
# Required-Start:
# Should-Start:
# Required-Stop:
# Should-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Reset system activity data collector file
# Description: Reset system activity data collector file
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2012-05-10 17:27:43 -0500 (Thu, 10 May 2012) $
case "$1" in
start)
log_info_msg "Calling the system activity data collector (sadc)..."
/usr/lib/sa/sadc -F -L -
evaluate_retval
;;
*)
echo "Usage: $0 start"
exit 1
;;
esac
# End /etc/init.d/sysstat

View File

@ -0,0 +1,59 @@
#!/bin/sh
########################################################################
# Begin unbound
#
# Description : Unbound DNS resolver boot script
#
# Author : Igor Živković <contact@igor-zivkovic.from.hr>
#
# Version : BLFS SVN
#
########################################################################
### BEGIN INIT INFO
# Provides: unbound
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts Unbound DNS resolver
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: igor $
#$Date: 2013-07-21 18:16:47 -0500 (Sun, 21 Jul 2013) $
case "$1" in
start)
log_info_msg "Starting Unbound DNS resolver..."
unbound-anchor
start_daemon /usr/sbin/unbound
evaluate_retval
;;
stop)
log_info_msg "Stopping Unbound DNS resolver..."
killproc -p "/run/unbound.pid" /usr/sbin/unbound
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/unbound
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End unbound

View File

@ -0,0 +1,69 @@
#!/bin/sh
########################################################################
# Begin exim
#
# Description : Starts Virtuoso Universal
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.2
#
########################################################################
### BEGIN INIT INFO
# Provides: virtuoso
# Required-Start: $syslog $local_fs $network
# Should-Start: $remote_fs
# Required-Stop: $network
# Should-Stop: $remote_fs
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Controls virtuoso data server
# Description: Controls virtuoso data server
# X-LFS-Provided-By: BLFS / LFS 7.2
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2012-05-10 17:27:43 -0500 (Thu, 10 May 2012) $
virtuoso_db="/var/lib/virtuoso/db"
case "$1" in
start)
log_info_msg "Starting Virtuoso Universal Server..."
cd $virtuoso_db
start_daemon /usr/bin/virtuoso-t
evaluate_retval
;;
stop)
log_info_msg "Stopping Virtuoso Universal Server..."
killproc /usr/bin/virtuoso-t
evaluate_retval
;;
reload)
log_info_msg "Reloading Virtuoso Universal Server..."
killproc /usr/bin/virtuoso-t -HUP
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/bin/virtuoso-t
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/virtuoso

View File

@ -0,0 +1,66 @@
#!/bin/sh
########################################################################
# Begin /etc/init.d/vsftpd
#
# Description : Start Very Secure FTP Daemon
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.0
#
########################################################################
### BEGIN INIT INFO
# Provides: ftpd
# Required-Start: $remote_fs
# Should-Start:
# Required-Stop: $remote_fs
# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts vsftpd server.
# Description: Starts Very Secure FTP Daemon (vsftpd).
# X-LFS-Provided-By: LFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2011-12-05 20:37:16 -0600 (Mon, 05 Dec 2011) $
case "$1" in
start)
log_info_msg "Starting vsFTPD Server..."
start_daemon /usr/sbin/vsftpd
evaluate_retval
;;
stop)
log_info_msg "Stopping vsFTPD Server..."
killproc /usr/sbin/vsftpd
evaluate_retval
;;
reload)
log_info_msg "Reloading vsFTPD Server..."
killproc /usr/sbin/vsftpd -HUP
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/vsftpd
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/vsftpd

View File

@ -0,0 +1,77 @@
#!/bin/sh
########################################################################
# Begin wicd
#
# Description : Wicd bootscript
#
# Authors : Ragnar Thomsen - rthomsen@linuxfromscratch.org
#
# Version : LFS 7.1
#
########################################################################
### BEGIN INIT INFO
# Provides:
# Required-Start:
# Should-Start:
# Required-Stop:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts the wicd daemon.
# Description: Starts the wicd daemon
# X-LFS-Provided-By: LFS
### END INIT INFO
. /lib/lsb/init-functions
PIDFILE="/var/run/wicd/wicd.pid"
case "${1}" in
start)
if [ -e $PIDFILE ]; then
echo "Wicd appears to already be running."
echo "If this is not the case, then remove"
echo "$PIDFILE and try again..."
else
log_info_msg "Starting wicd daemon..."
start_daemon /usr/sbin/wicd 1>/dev/null
evaluate_retval
fi
;;
stop)
log_info_msg "Stopping wicd daemon..."
if [ -e $PIDFILE ]; then
# Shut down wpa_supplicant and any started dhcp
# clients before we kill Wicd
wicd-cli -xyz 1>/dev/null
kill $(cat $PIDFILE)
evaluate_retval
else
echo "Wicd appears not to be running..."
fi
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
if [ -e $PIDFILE ]; then
echo "Wicd is running with pid $(cat $PIDFILE)"
else
echo "Wicd appears not to be running..."
fi
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
exit 0
# End wicd

View File

@ -0,0 +1,64 @@
#!/bin/sh
# Begin /etc/init.d/winbindd
### BEGIN INIT INFO
# Provides: winbindd
# Required-Start: samba
# Should-Start:
# Required-Stop: samba
# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Provides Name Server Switch (NSS) capabilities to Samba.
# Description: Starts the winbindd daemon to provide
# Name Server Swithch (NSS) capabilities to Samba.
# X-LFS-Provided-By: BLFS
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: bdubbs $
#$Date: 2012-08-26 15:15:30 -0500 (Sun, 26 Aug 2012) $
PIDFILE=/var/run/winbindd.pid
case "$1" in
start)
log_info_msg "Starting winbindd..."
start_daemon /usr/sbin/winbindd
evaluate_retval
;;
stop)
log_info_msg "Stopping winbindd..."
killproc -p ${PIDFILE} /usr/sbin/winbindd
evaluate_retval
log_info_msg "Stopping nmbd..."
killproc /usr/sbin/nmbd
evaluate_retval
;;
reload)
log_info_msg "Reloading smbd..."
killproc /usr/sbin/winbindd -HUP
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/winbindd
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/winbindd

View File

@ -0,0 +1,67 @@
#!/bin/sh
########################################################################
# Begin xinetd
#
# Description : Start xinetd super server daemon
#
# Author : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS 7.2
#
########################################################################
### BEGIN INIT INFO
# Provides: xinetd
# Required-Start: $network
# Should-Start:
# Required-Stop: $network
# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Starts the xinetd daemon.
# Description: Starts the xinetd super server daemon to llisten to
# specified incoming tcp and udp ports and execute
# the configured service.
# X-LFS-Provided-By: BLFS / LFS 7.2
### END INIT INFO
. /lib/lsb/init-functions
#$LastChangedBy: dj $
#$Date: 2011-12-05 01:38:40 -0600 (Mon, 05 Dec 2011) $
case "$1" in
start)
log_info_msg "Starting xinetd..."
start_daemon /usr/sbin/xinetd
evaluate_retval
;;
stop)
log_info_msg "Stopping xinetd..."
killproc /usr/sbin/xinetd
evaluate_retval
;;
reload)
log_info_msg "Reloading xinetd..."
killproc /usr/sbin/xinetd -HUP
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/xinetd
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/xinetd

View File

@ -0,0 +1,76 @@
#!/bin/sh
########################################################################
# Begin /lib/services/bridge
#
# Description : Bridge Boot Script
#
# Authors : Nathan Coulson - nathan@linuxfromscratch.org
# Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version : LFS-7.2
#
########################################################################
. /lib/lsb/init-functions
. ${IFCONFIG}
# Make compatible with older versions of init-functions
unset is_true
is_true()
{
[ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ] ||
[ "$1" = "y" ] || [ "$1" = "t" ]
}
if [ -z "${INTERFACE_COMPONENTS}" ]; then
log_failure_msg "INTERFACE_COMPONENTS variable missing from ${IFCONFIG}"
exit 1
fi
case "${2}" in
up)
log_info_msg2 "\n"
log_info_msg "Creating the ${1} interface..."
brctl addbr ${1}
evaluate_retval
for I in ${INTERFACE_COMPONENTS}; do
log_info_msg "Adding ${I} to ${1}..."
brctl addif ${1} ${I}
evaluate_retval
done
if is_true ${STP}; then
brctl stp ${1} on
log_success_msg "Setting spanning tree protocol"
fi
if is_true ${IP_FORWARD}; then
sysctl -w net.ipv4.ip_forward=1 > /dev/null
log_success_msg "Setting net.ipv4.ip_forward = 1"
fi
;;
down)
for I in ${INTERFACE_COMPONENTS}; do
log_info_msg "Removing ${I} from ${1}..."
ip link set ${I} down &&
brctl delif ${1} ${I}
evaluate_retval
done
log_info_msg "Bringing down the ${1} interface..."
ip link set ${1} down
brctl delbr ${1}
evaluate_retval
;;
*)
echo "Usage: ${0} [interface] {up|down}"
exit 1
;;
esac
# End /lib/services/bridge

View File

@ -0,0 +1,119 @@
#!/bin/sh
# Begin services/dhclient
# Origianlly based upon lfs-bootscripts-1.12 $NETWORK_DEVICES/if{down,up}
# Rewritten by Nathan Coulson <nathan@linuxfromscratch.org>
# Adapted for dhclient by DJ Lucas <dj@linuxfromscratch.org>
# Update for LFS 7.0 by Ken Moffat <ken@linuxfromscratch.org>
# Call with: IFCONFIG=<filename> /lib/services/dhclient <IFACE> <up | down>
#$LastChangedBy: bdubbs $
#$Date: 2014-08-27 13:01:33 -0500 (Wed, 27 Aug 2014) $
. /lib/lsb/init-functions
. $IFCONFIG
PIDFILE=/run/dhclient-$1.pid
LFILE=/var/lib/dhclient/dhclient-$1.leases
getipstats()
{
# Print the last 16 lines of dhclient.leases
sed -e :a -e '$q;N;17,$D;ba' ${LFILE}
}
# Make compatible with older versions of init-functions
unset is_true
is_true()
{
[ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ] ||
[ "$1" = "y" ] || [ "$1" = "t" ]
}
case "$2" in
up)
if [ -e ${PIDFILE} ]; then
ps $(cat ${PIDFILE}) | grep dhclient >/dev/null
if [ "$?" = "0" ]; then
log_warning_msg "\n dhclient appears to be running on $1"
exit 0
else
rm ${PIDFILE}
fi
fi
log_info_msg "\n Starting dhclient on the $1 interface..."
/sbin/dhclient -lf ${LFILE} -pf ${PIDFILE} $DHCP_START $1
if [ "$?" != "0" ]; then
log_failure_msg2
exit 1
fi
# Print the assigned settings if requested
if is_true "$PRINTIP" -o is_true "$PRINTALL"; then
# Get info from dhclient.leases file
IPADDR=`getipstats | grep "fixed-address" | \
sed 's/ fixed-address //' | \
sed 's/\;//'`
NETMASK=`getipstats | grep "subnet-mask" | \
sed 's/ option subnet-mask //' | \
sed 's/\;//'`
GATEWAY=`getipstats | grep "routers" | \
sed 's/ option routers //' | \
sed 's/\;//'`
DNS=`getipstats | grep "domain-name-servers" | \
sed 's/ option domain-name-servers //' | \
sed 's/\;//' | sed 's/,/ and /'`
if [ "$PRINTALL" = "yes" ]; then
# This is messy, the messages are on one very long
# line on the screen and in the log
log_info_msg " DHCP Assigned Settings for $1:"
log_info_msg " IP Address: $IPADDR"
log_info_msg " Subnet Mask: $NETMASK"
log_info_msg " Default Gateway: $GATEWAY"
log_info_msg " DNS Server: $DNS"
else
log_info_msg " IP Addresss:""$IPADDR"
fi
fi
log_success_msg2
;;
down)
if [ ! -e ${PIDFILE} ]; then
log_warning_msg "\n dhclient doesn't appear to be running on $1"
exit 0
fi
log_info_msg "\n Stopping dhclient on the $1 interface..."
/sbin/dhclient -r -lf ${LFILE} -pf ${PIDFILE} $DHCP_STOP $1
if [ -e ${PIDFILE} ]; then
ps $(cat ${PIDFILE}) | grep dhclient >/dev/null
if [ "$?" != "0" ]; then
rm -f ${PIDFILE}
fi
fi
evaluate_retval
;;
*)
echo "Usage: $0 [interface] {up|down}"
exit 1
;;
esac
# End services/dhclient

View File

@ -0,0 +1,69 @@
#!/bin/bash
# Begin services/dhcpcd
# Origianlly dased upon lfs-bootscripts-1.12 $NETWORK_DEVICES/if{down,up}
# Rewritten by Nathan Coulson <nathan@linuxfromscratch.org>
# Adapted for dhcpcd by DJ Lucas <dj@linuxfromscratch.org>
# Update for LFS 7.0 by Bruce Dubbs <bdubbs@linuxfromscratch,org>
# Call with: IFCONFIG=<filename> /lib/services/dhcpcd <IFACE> <up | down>
#$LastChangedBy: bdubbs $
#$Date: 2012-04-09 14:48:51 -0500 (Mon, 09 Apr 2012) $
. /lib/lsb/init-functions
. $IFCONFIG
pidfile="/var/run/dhcpcd-$1.pid"
case "$2" in
up)
# Cosmetic output not needed for multiple services
if ! $(echo ${SERVICE} | grep -q " "); then
log_info_msg2 "\n" # Terminate the previous message
fi
log_info_msg "Starting dhcpcd on the $1 interface..."
# Test to see if there is a stale pid file
if [ -f "$pidfile" ]; then
ps `cat "$pidfile"` | grep dhcpcd > /dev/null
if [ $? != 0 ]; then
rm -f /var/run/dhcpcd-$1.pid > /dev/null
else
log_warning_msg "dhcpcd is already running!"
exit 2
fi
fi
/sbin/dhcpcd $1 $DHCP_START
evaluate_retval
;;
down)
log_info_msg "Stopping dhcpcd on the $1 interface..."
if [ -z "$DHCP_STOP" ]; then
killproc -p "${pidfile}" /sbin/dhcpcd
else
/sbin/dhcpcd $1 $DHCP_STOP &> /dev/null
if [ "$?" -eq 1 ]; then
log_warning_msg "dhcpcd not running!"
exit 2
fi
fi
evaluate_retval
;;
*)
echo "Usage: $0 [interface] {up|down}"
exit 1
;;
esac
# End services/dhcpcd

View File

@ -0,0 +1,96 @@
#!/bin/bash
# Begin services/wpa
# Origianlly based upon lfs-bootscripts-1.12 $NETWORK_DEVICES/if{down,up}
# Written by Armin K. <krejzi at email dot com>
# Call with: IFCONFIG=<filename> /lib/services/wpa <IFACE> <up | down>
#$LastChangedBy: bdubbs $
#$Date: 2016-09-02 23:10:02 -0500 (Fri, 02 Sep 2016) $
. /lib/lsb/init-functions
. $IFCONFIG
CFGFILE=/etc/sysconfig/wpa_supplicant-${IFCONFIG##*.}.conf
PIDFILE=/run/wpa_supplicant/$1.pid
CONTROL_IFACE=/run/wpa_supplicant/$1
case "$2" in
up)
if [ -e ${PIDFILE} ]; then
ps $(cat ${PIDFILE}) | grep wpa_supplicant >/dev/null
if [ "$?" = "0" ]; then
log_warning_msg "\n wpa_supplicant already running on $1."
exit 0
else
rm ${PIDFILE}
fi
fi
if [ ! -e ${CFGFILE} ]; then
log_info_msg "\n wpa_supplicant configuration file ${CFGFILE} not present"
log_failure_msg2
exit 1
fi
# Only specify -C on command line if it is not in CFGFILE
if ! grep -q ctrl_interface ${CFGFILE}; then
WPA_ARGS="-C/run/wpa_supplicant ${WPA_ARGS}"
fi
log_info_msg "\n Starting wpa_supplicant on the $1 interface..."
mkdir -p /run/wpa_supplicant
/sbin/wpa_supplicant -q -B -Dnl80211,wext -P${PIDFILE} \
-c${CFGFILE} -i$1 ${WPA_ARGS}
if [ "$?" != "0" ]; then
log_failure_msg2
exit 1
fi
log_success_msg2
if [ -n "${WPA_SERVICE}" ]; then
if [ ! -e /lib/services/${WPA_SERVICE} -a \
! -x /lib/services/${WPA_SERVICE} ]; then
log_info_msg "\n Cannot start ${WPA_SERVICE} on $1"
log_failure_msg2
exit 1
fi
IFCONFIG=${IFCONFIG} /lib/services/${WPA_SERVICE} $1 up
fi
;;
down)
if [ -n "${WPA_SERVICE}" ]; then
if [ ! -e /lib/services/${WPA_SERVICE} -a ! -x /lib/services/${WPA_SERVICE} ]; then
log_warning_msg "\n Cannot stop ${WPA_SERVICE} on $1"
else
IFCONFIG=${IFCONFIG} /lib/services/${WPA_SERVICE} $1 down
fi
fi
log_info_msg "\n Stopping wpa_supplicant on the $1 interface..."
if [ -e ${PIDFILE} ]; then
kill -9 $(cat ${PIDFILE})
rm -f ${PIDFILE} ${CONTROL_IFACE}
evaluate_retval
else
log_warning_msg "\n wpa_supplicant already stopped on $1"
exit 0
fi
;;
*)
echo "Usage: $0 [interface] {up|down}"
exit 1
;;
esac
# End services/wpa

View File

@ -0,0 +1,23 @@
#!/bin/bash
#
# Autofs configuration file
#
# Filename: /etc/sysconfig/autofs.conf
#
# Author: Bryan Mason
#
# Edit History:
#
# Date Author Action
# ----------------------------------------------------------------------
# 19 Jan 2004 B. Mason Created
# 18 Oct 2004 L. Lawrence Assume /usr is not mounted, add timeout
automount=/sbin/automount
localoptions=''
daemonoptions='--timeout 60'
piddir=/var/run
pidroot=autofs
# END

View File

@ -0,0 +1,11 @@
# Begin /etc/sysconfig/bluetooth
# A space delimied list of devices to start at boot time
ACTIVE_HCI_DEVICES_ON_BOOT="hci0"
# A semicolon delimited list of SDP (Service Discovery Protocol)
# operations for bluetooth devices. See the sdptool for more
# details.
SDPTOOL_OPTIONS=""
# End /etc/sysconfig/bluetooth

View File

@ -0,0 +1,11 @@
# Begin /etc/sysconfig/dhcpd
# On which interfaces should the DHCP Server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES=""
# Additional options that you want to pass to the DHCP Server Daemon?
OPTIONS=""
# End /etc/sysconfig/dhcpd

View File

@ -0,0 +1,32 @@
# Begin /etc/sysconfig/saslauthd
# Change this to "yes" and select authentification mechanism below
# to enable saslauthd
START="no"
# Which authentification mechanism should saslauthd use?
#
# These are some of the available options:
# kerberos5 -- use Kerberos 5 (available if you compiled saslauthd with
# MIT Kerberos5 support).
# pam -- use PAM (available if you compiled saslauthd with
# Linux PAM support).
# shadow -- use the local shadow password file
# sasldb -- use the local sasldb database file
# ldap -- use LDAP (configuration is in /etc/saslauthd.conf)
# (Available only if you compiled saslauthd with
# OpenLDAP support and with --enable-ldapdb configure switch).
#
# Alternatively, you can run /usr/sbin/pluginviewer to see which plugins
# are available.
AUTHMECH=""
# Add any aditional options you want to pass to saslauthd command line.
# See man 8 saslauthd for more information
OPTIONS=""
# End /etc/sysconfig/saslauthd

View File

@ -0,0 +1,13 @@
# Begin /etc/sysconfig/slapd
# slapd normally serves ldap only on all TCP-ports 389. slapd can also
# service requests on TCP-port 636 (ldaps) and requests via unix
# sockets.
# Example usage:
#SLAPD_SERVICES="ldap://127.0.0.1:389/ ldaps:/// ldapi:///"
# Add any aditional options you want to pass to slapd command line.
# See man 8 slapd for more information
SLAPD_OPTIONS=""
# End /etc/sysconfig/slapd

31
bin/mps
View File

@ -4,7 +4,7 @@ if [ -f /etc/mps.conf ];then
. /etc/mps.conf
fi
. /root/bin/fonks.sh
versiyon="0.9.3"
versiyon="0.9.4"
iletisim="milisarge@gmail.com"
paketdepo="/depo/paketler/"
if [ -z ${sunucu+:} ]; then
@ -911,6 +911,28 @@ git_proje_kur(){
}
servis_kur(){
cd /sources/milis.git/ayarlar/servisler
if make kur-$1
then
ryaz 32 "$1 servisi kuruldu"
else
ryaz 31 "$1 servisi kurulum olumsuz!!!"
fi
cd -
}
servis_sil(){
cd /sources/milis.git/ayarlar/servisler
if make sil-$1
then
ryaz 32 "$1 servisi silindi"
else
ryaz 31 "$1 servisi silme olumsuz!!!"
fi
cd -
}
paketvt_guncelle(){
temel_tarihce_kontrol
wget -q --spider "$sunucu""paket.vt"
@ -1131,8 +1153,15 @@ ayarlar() {
else
paket_inkur_oto "$2"
fi ;;
#özel git projesi kurmak için
gitkur)
git_proje_kur "$2" ;;
#ilgili paketin servisini kurar
serkur)
servis_kur "$2" ;;
#ilgili paketin servisini siler
sersil)
servis_sil "$2" ;;
kurkos)
local pkt
pkt="`find $talimatname_dizin -name $2`"