mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 03:07:43 +02:00
Hinzugefuegt:
* SquidGuard - mit Patch damit es mit der DB 4.4.20 funktioniert. * wput - wget nur andersrum. * hddtemp/hddgraph * etherwake * Saemtliche Bootscripts vom BLFS * vpn-restart-script... muss noch bearbeitet werden. Geaendert: * Karsten Rechenbachs Emailadresse in die Credits gebaut. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@168 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -1365,6 +1365,16 @@ usr/local/bin/timecheckctrl
|
||||
#usr/local/bin/tunerrd.pl
|
||||
usr/local/bin/logtailfwhits
|
||||
usr/local/bin/resetusb
|
||||
usr/local/bin/rcasterisk
|
||||
usr/local/bin/rcsamba
|
||||
usr/local/bin/rcapplejuice
|
||||
usr/local/bin/rcxinetd
|
||||
usr/local/bin/rccups
|
||||
usr/local/bin/rccyrus-sasl
|
||||
usr/local/bin/rcgnump3d
|
||||
usr/local/bin/rcnfs-server
|
||||
usr/local/bin/rcpostfix
|
||||
usr/local/bin/rcwinbind
|
||||
#usr/local/doc
|
||||
#usr/local/etc
|
||||
#usr/local/include
|
||||
@@ -15941,7 +15951,7 @@ bin/zcat
|
||||
#usr/bin/zegrep
|
||||
#usr/bin/zfgrep
|
||||
#usr/bin/zforce
|
||||
#usr/bin/zgrep
|
||||
usr/bin/zgrep
|
||||
#usr/bin/zless
|
||||
#usr/bin/zmore
|
||||
#usr/bin/znew
|
||||
@@ -20982,10 +20992,12 @@ etc/httpd/conf/httpd.conf
|
||||
#home/httpd
|
||||
#home/httpd/cgi-bin
|
||||
home/httpd/cgi-bin/aliases.cgi
|
||||
home/httpd/cgi-bin/backup.cgi
|
||||
#home/httpd/cgi-bin/backup.cgi
|
||||
#home/httpd/cgi-bin/base.cgi
|
||||
home/httpd/cgi-bin/changepw.cgi
|
||||
home/httpd/cgi-bin/chpasswd.cgi
|
||||
home/httpd/cgi-bin/connections.cgi
|
||||
home/httpd/cgi-bin/country.cgi
|
||||
home/httpd/cgi-bin/credits.cgi
|
||||
home/httpd/cgi-bin/ddns.cgi
|
||||
home/httpd/cgi-bin/dhcp.cgi
|
||||
@@ -20994,13 +21006,13 @@ home/httpd/cgi-bin/dmzholes.cgi
|
||||
home/httpd/cgi-bin/graphs.cgi
|
||||
home/httpd/cgi-bin/gui.cgi
|
||||
home/httpd/cgi-bin/hosts.cgi
|
||||
home/httpd/cgi-bin/hddgraph.cgi
|
||||
home/httpd/cgi-bin/ids.cgi
|
||||
home/httpd/cgi-bin/index.cgi
|
||||
home/httpd/cgi-bin/ipinfo.cgi
|
||||
home/httpd/cgi-bin/fwhits.cgi
|
||||
home/httpd/cgi-bin/ovpnfunc.pl
|
||||
home/httpd/cgi-bin/ovpnmain.cgi
|
||||
home/httpd/html/images/openvpn.gif
|
||||
#home/httpd/cgi-bin/logs.cgi
|
||||
home/httpd/cgi-bin/logs.cgi/config.dat
|
||||
home/httpd/cgi-bin/logs.cgi/firewalllog.dat
|
||||
@@ -21027,6 +21039,7 @@ home/httpd/cgi-bin/time.cgi
|
||||
#home/httpd/cgi-bin/updates.cgi
|
||||
home/httpd/cgi-bin/upload.cgi
|
||||
home/httpd/cgi-bin/vpnmain.cgi
|
||||
home/httpd/cgi-bin/webaccess.cgi
|
||||
home/httpd/cgi-bin/wireless.cgi
|
||||
home/httpd/cgi-bin/xtaccess.cgi
|
||||
home/httpd/cgi-bin/traffic.cgi
|
||||
@@ -22198,7 +22211,7 @@ sbin/hdparm
|
||||
etc/ppp/ibod.cf
|
||||
usr/sbin/ibod
|
||||
##
|
||||
## initscripts
|
||||
## initscripts & startscripts
|
||||
##
|
||||
#etc/rc.d
|
||||
#etc/rc.d/helper
|
||||
@@ -22229,6 +22242,7 @@ etc/rc.d/rc.pulsardsl
|
||||
etc/rc.d/rc.red
|
||||
etc/rc.d/rc.sysinit
|
||||
etc/rc.d/rc.updatered
|
||||
etc/init.d
|
||||
##
|
||||
## iptables-1.3.4
|
||||
##
|
||||
|
||||
43
src/init.d/cups
Normal file
43
src/init.d/cups
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
# Begin /etc/init.d/cups
|
||||
|
||||
#$LastChangedBy: bdubbs $
|
||||
#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
|
||||
|
||||
# Start or stop the CUPS server based upon the first argument to the script.
|
||||
|
||||
. /etc/init.d/init-functions
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
boot_mesg "Starting CUPS Printserver..."
|
||||
loadproc /usr/sbin/cupsd
|
||||
;;
|
||||
|
||||
stop)
|
||||
boot_mesg "Stopping CUPS Printserver..."
|
||||
killproc /usr/sbin/cupsd
|
||||
;;
|
||||
|
||||
reload)
|
||||
boot_mesg "Reloading CUPS Printserver..."
|
||||
reloadproc /usr/sbin/cupsd
|
||||
;;
|
||||
|
||||
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
|
||||
39
src/init.d/cyrus-sasl
Normal file
39
src/init.d/cyrus-sasl
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
# Begin /etc/init.d/cyrus-sasl
|
||||
|
||||
# Based on sysklogd script from LFS-3.1 and earlier.
|
||||
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
||||
|
||||
#$LastChangedBy: bdubbs $
|
||||
#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
|
||||
|
||||
. /etc/init.d/init-functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
boot_mesg "Starting the Cyrus SASL Server..."
|
||||
loadproc /usr/sbin/saslauthd -a pam
|
||||
;;
|
||||
|
||||
stop)
|
||||
boot_mesg "Stopping the Cyrus SASL Server..."
|
||||
killproc /usr/sbin/saslauthd
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
status)
|
||||
statusproc /usr/sbin/saslauthd
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End /etc/init.d/cyrus-sasl
|
||||
348
src/init.d/init-functions
Normal file
348
src/init.d/init-functions
Normal file
@@ -0,0 +1,348 @@
|
||||
|
||||
#*******************************************************************************
|
||||
# Function - start_daemon [-f] [-n nicelevel] [-p pidfile] pathname [args]
|
||||
#
|
||||
# Purpose: This runs the specified program as a daemon
|
||||
#
|
||||
# Inputs: -f, run the program even if it is already running
|
||||
# -n nicelevel, specifies a nice level. See nice(1).
|
||||
# -p pidfile, uses the specified pidfile
|
||||
# pathname, pathname to the specified program
|
||||
# args, arguments to pass to specified program
|
||||
#
|
||||
# Outputs: return 0 - Success
|
||||
# return 2 - Invalid or excessive number of arguments,
|
||||
# warning in stdout
|
||||
# return 4 - Program or service status is unknown
|
||||
#
|
||||
# Dependencies: nice
|
||||
#
|
||||
# Todo: none
|
||||
#
|
||||
#*******************************************************************************
|
||||
start_daemon()
|
||||
{
|
||||
local pidfile=""
|
||||
local forcestart=""
|
||||
local nicelevel="0"
|
||||
|
||||
while true
|
||||
do
|
||||
case "${1}" in
|
||||
-f)
|
||||
forcestart="1"
|
||||
shift 1
|
||||
;;
|
||||
-n)
|
||||
nicelevel="${2}"
|
||||
shift 2
|
||||
;;
|
||||
-p)
|
||||
pidfile="${2}"
|
||||
shift 2
|
||||
;;
|
||||
-*)
|
||||
log_failure_msg "Unknown Option: ${1}"
|
||||
return 2
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "${forcestart}" ]; then
|
||||
if [ -z "${pidfile}" ]; then
|
||||
pidofproc "${1}" > /dev/null
|
||||
else
|
||||
pidofproc -p "${pidfile}" "${1}" > /dev/null
|
||||
fi
|
||||
|
||||
case "${?}" in
|
||||
0)
|
||||
log_warning_msg "Unable to continue: ${1} is running"
|
||||
return 4
|
||||
;;
|
||||
1)
|
||||
log_warning_msg "Unable to continue: ${pidfile} exists"
|
||||
return 4
|
||||
;;
|
||||
3)
|
||||
;;
|
||||
*)
|
||||
log_failure_msg "Unknown error code from pidofproc: ${?}"
|
||||
return 4
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
nice -n "${nicelevel}" "${@}"
|
||||
}
|
||||
|
||||
#*******************************************************************************
|
||||
# Function - killproc [-p pidfile] pathname [signal]
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
# Inputs: -p pidfile, uses the specified pidfile
|
||||
# pathname, pathname to the specified program
|
||||
# signal, send this signal to pathname
|
||||
#
|
||||
# Outputs: return 0 - Success
|
||||
# return 1 - Invalid or excessive number of arguments,
|
||||
# warning in stdout
|
||||
# return 4 - Unknown Status
|
||||
#
|
||||
# Dependencies: kill
|
||||
#
|
||||
# Todo: test
|
||||
#
|
||||
#*******************************************************************************
|
||||
killproc()
|
||||
{
|
||||
local pidfile=""
|
||||
local killsig=""
|
||||
local pidlist=""
|
||||
while true
|
||||
do
|
||||
case "${1}" in
|
||||
-p)
|
||||
pidfile="${2}"
|
||||
shift 2
|
||||
;;
|
||||
-*)
|
||||
log_failure_msg "Unknown Option: ${1}"
|
||||
return 1
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "${#}" = "2" ]; then
|
||||
killsig="${2}"
|
||||
elif [ "${#}" != "1" ]; then
|
||||
shift 2
|
||||
log_failure_msg "Excess Arguments: $@"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${pidfile}" ]; then
|
||||
pidlist=`pidofproc "${1}"`
|
||||
else
|
||||
pidlist=`pidofproc -p "${pidfile}" "${1}"`
|
||||
fi
|
||||
|
||||
for pid in ${pidlist}
|
||||
do
|
||||
kill -${killsig:-TERM} ${pid} 2> /dev/null
|
||||
if [ -z "${killsig}" ]; then
|
||||
# Wait up to 3 seconds, for ${pid} to terminate
|
||||
local dtime=3
|
||||
while [ "${dtime}" != "0" ]
|
||||
do
|
||||
kill -0 ${pid} 2> /dev/null || break
|
||||
sleep 1
|
||||
dtime=$(( ${dtime} - 1))
|
||||
done
|
||||
# If ${pid} is still running, kill it
|
||||
kill -0 ${pid} 2> /dev/null && kill -KILL ${pid} 2> /dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "${killsig}" ]; then
|
||||
pidofproc "${1}" 2>&1 > /dev/null
|
||||
|
||||
# Program was terminated
|
||||
if [ "$?" != "0" ]; then
|
||||
# Pidfile Exists
|
||||
if [ -f "${pidfile}" ]; then
|
||||
rm -f "${pidfile}" 2>&1 > /dev/null
|
||||
fi
|
||||
return 0
|
||||
else # Program is still running
|
||||
return 4 # Unknown Status
|
||||
fi
|
||||
else
|
||||
if [ -z "${pidfile}" ]; then
|
||||
pidofproc "${1}" 2> /dev/null
|
||||
else
|
||||
pidofproc -p "${pidfile}" "${1}" 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#*******************************************************************************
|
||||
# Function - pidofproc [-p pidfile] pathname
|
||||
#
|
||||
# Purpose: This function returns one or more pid(s) for a particular daemon
|
||||
#
|
||||
# Inputs: -p pidfile, use the specified pidfile instead of pidof
|
||||
# pathname, path to the specified program
|
||||
#
|
||||
# Outputs: return 0 - Success, pid's in stdout
|
||||
# return 1 - Invalid or excessive number of arguments,
|
||||
# warning in stdout
|
||||
# return 1 - Program is dead, pidfile exists
|
||||
# return 3 - Program is not running
|
||||
#
|
||||
# Dependencies: pidof, echo
|
||||
#
|
||||
# Todo: - Invalid or excessive argments, and program is dead pidfile exists
|
||||
# conflict with eachother
|
||||
#
|
||||
#*******************************************************************************
|
||||
pidofproc()
|
||||
{
|
||||
local pidfile=""
|
||||
local lpids=""
|
||||
local pidlist=""
|
||||
while true
|
||||
do
|
||||
case "${1}" in
|
||||
-p)
|
||||
pidfile="${2}"
|
||||
shift 2
|
||||
;;
|
||||
-*)
|
||||
log_failure_msg "Unknown Option: ${1}"
|
||||
return 1
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "${#}" != "1" ]; then
|
||||
shift 1
|
||||
log_failure_msg "Excess Arguments: $@"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -n "${pidfile}" ]; then
|
||||
if [ ! -r "${pidfile}" ]; then
|
||||
return 3 # Program is not running
|
||||
fi
|
||||
|
||||
lpids=`head -n 1 ${pidfile}`
|
||||
for pid in ${lpids}
|
||||
do
|
||||
if [ "${pid}" -ne "$$" -a "${pid}" -ne "${PPID}" ]; then
|
||||
kill -0 "${pid}" 2> /dev/null &&
|
||||
pidlist="${pidlist} ${pid}"
|
||||
fi
|
||||
echo ${pidlist}
|
||||
test -z "${pidlist}" && return 1 # Program is dead, pidfile exists
|
||||
return 0
|
||||
done
|
||||
|
||||
else
|
||||
pidof "${1}"
|
||||
fi
|
||||
|
||||
if [ "$?" != "0" ]; then
|
||||
return 3 # Program is not running
|
||||
fi
|
||||
}
|
||||
|
||||
# Screen Dimentions
|
||||
if [ -z "${COLUMNS}" ]; then
|
||||
COLUMNS=$(stty size)
|
||||
COLUMNS=${COLUMNS##* }
|
||||
fi
|
||||
|
||||
# When using remote connections, such as a serial port, stty size returns 0
|
||||
if [ "${COLUMNS}" = "0" ]; then
|
||||
COLUMNS=80
|
||||
fi
|
||||
|
||||
# Measurements for positioning result messages
|
||||
COL=$((${COLUMNS} - 8))
|
||||
WCOL=$((${COL} - 2))
|
||||
|
||||
# Set Cursur Position Commands, used via echo -e
|
||||
SET_COL="\\033[${COL}G" # at the $COL char
|
||||
SET_WCOL="\\033[${WCOL}G" # at the $WCOL char
|
||||
CURS_UP="\\033[1A\\033[0G" # Up one line, at the 0'th char
|
||||
|
||||
# Set color commands, used via echo -e
|
||||
# Please consult `man console_codes` for more information
|
||||
# under the "Set Graphics Resolution" section
|
||||
#
|
||||
# Warning, when switching from a 8bit to a 9bit font,
|
||||
# the linux console will reinterpret the bold (1;) to
|
||||
# the top 256 glyphs of the 9bit font. This does
|
||||
# not affect framebuffer consoles
|
||||
NORMAL="\\033[0;39m" # Standard console grey
|
||||
SUCCESS="\\033[1;32m" # Success is green
|
||||
WARNING="\\033[1;33m" # Warnings are yellow
|
||||
FAILURE="\\033[1;31m" # Failures are red
|
||||
INFO="\\033[1;36m" # Information is light cyan
|
||||
BRACKET="\\033[1;34m" # Brackets are blue
|
||||
|
||||
BOOTMESG_PREFIX=" * " # Text at the beginning of every line
|
||||
|
||||
|
||||
#*******************************************************************************
|
||||
# Function - log_success_msg "message"
|
||||
#
|
||||
# Purpose: Print a success message
|
||||
#
|
||||
# Inputs:
|
||||
#
|
||||
# Outputs:
|
||||
#
|
||||
# Dependencies: echo
|
||||
#
|
||||
# Todo: logging
|
||||
#
|
||||
#*******************************************************************************
|
||||
log_success_msg()
|
||||
{
|
||||
echo -n -e "${BOOTMESG_PREFIX}${@}"
|
||||
echo -e "${SET_COL}""${BRACKET}""[""${SUCCESS}"" OK ""${BRACKET}""]""${NORMAL}"
|
||||
return 0
|
||||
}
|
||||
|
||||
#*******************************************************************************
|
||||
# Function - log_failure_msg "message"
|
||||
#
|
||||
# Purpose: Print a failure message
|
||||
#
|
||||
# Inputs: $@ - Message
|
||||
#
|
||||
# Outputs: Text output to screen
|
||||
#
|
||||
# Dependencies: echo
|
||||
#
|
||||
# Todo: logging
|
||||
#
|
||||
#*******************************************************************************
|
||||
log_failure_msg() {
|
||||
echo -n -e "${BOOTMESG_PREFIX}${@}"
|
||||
echo -e "${SET_COL}""${BRACKET}""[""${FAILURE}"" FAIL ""${BRACKET}""]""${NORMAL}"
|
||||
return 0
|
||||
}
|
||||
|
||||
#*******************************************************************************
|
||||
# Function - log_warning_msg "message"
|
||||
#
|
||||
# Purpose: print a warning message
|
||||
#
|
||||
# Inputs: $@ - Message
|
||||
#
|
||||
# Outputs: Text output to screen
|
||||
#
|
||||
# Dependencies: echo
|
||||
#
|
||||
# Todo: logging
|
||||
#
|
||||
#*******************************************************************************
|
||||
log_warning_msg() {
|
||||
echo -n -e "${BOOTMESG_PREFIX}${@}"
|
||||
echo -e "${SET_COL}""${BRACKET}""[""${WARNING}"" WARN ""${BRACKET}""]""${NORMAL}"
|
||||
return 0
|
||||
}
|
||||
|
||||
112
src/init.d/nfs-server
Normal file
112
src/init.d/nfs-server
Normal file
@@ -0,0 +1,112 @@
|
||||
#!/bin/sh
|
||||
# Begin /etc/init.d/nfs-server
|
||||
|
||||
# Based on sysklogd script from LFS-3.1 and earlier.
|
||||
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
||||
|
||||
#$LastChangedBy: randy $
|
||||
#$Date: 2006-04-29 22:26:35 -0500 (Sat, 29 Apr 2006) $
|
||||
|
||||
. /etc/init.d/init-functions
|
||||
. /var/ipfire/nfs/nfs-server
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
boot_mesg "Starting NFS mountd..."
|
||||
loadproc /usr/sbin/rpc.mountd
|
||||
|
||||
boot_mesg "Starting NFS nfsd..."
|
||||
loadproc /usr/sbin/rpc.nfsd -p $PORT $PROCESSES
|
||||
|
||||
boot_mesg "Starting NFS statd..."
|
||||
loadproc /usr/sbin/rpc.statd
|
||||
|
||||
if [ "$QUOTAS" = "yes" ]; then
|
||||
boot_mesg "Starting NFS rquotad..."
|
||||
loadproc /usr/sbin/rpc.rquotad
|
||||
fi
|
||||
|
||||
# NFSD support only in 2.6 kernel
|
||||
/bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null
|
||||
if [ $? = 0 ]; then
|
||||
boot_mesg "Mounting nfsd virtual filesystem..."
|
||||
/bin/mount -t nfsd none /proc/fs/nfsd 2>&1 > /dev/null
|
||||
evaluate_retval
|
||||
fi
|
||||
|
||||
# Make ceratin that the list is refreshed on
|
||||
# a restart.
|
||||
boot_mesg "Exporting NFS Filesystems..."
|
||||
/usr/sbin/exportfs -ra 2>&1 > /dev/null
|
||||
evaluate_retval
|
||||
;;
|
||||
|
||||
stop)
|
||||
boot_mesg "Stopping NFS statd..."
|
||||
killproc /usr/sbin/rpc.statd
|
||||
|
||||
boot_mesg "Stopping NFS nfsd..."
|
||||
# nfsd needs HUP....
|
||||
TEMPSTOPSIG="$STOPSIG"
|
||||
STOPSIG="HUP"
|
||||
## Special case for nfsd with no full path
|
||||
killproc nfsd
|
||||
# return STOPSIG to it's orginal value...
|
||||
STOPSIG="$TEMPSTOPSIG"
|
||||
|
||||
boot_mesg "Stopping NFS mountd..."
|
||||
killproc /usr/sbin/rpc.mountd
|
||||
|
||||
if [ "$QUOTAS" = "yes" ]; then
|
||||
boot_mesg "Stopping NFS rquotad..."
|
||||
killproc /usr/sbin/rpc.rquotad
|
||||
fi
|
||||
|
||||
boot_mesg "Refreshing NFS Exported Filesystems..."
|
||||
/usr/sbin/exportfs -au 2>&1 > /dev/null
|
||||
evaluate_retval
|
||||
|
||||
# NFSD support only in 2.6 kernel
|
||||
/bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null
|
||||
if [ $? = 0 ]; then
|
||||
boot_mesg "Unmounting NFS Virtual Filesystem..."
|
||||
/bin/umount /proc/fs/nfsd 2>&1 > /dev/null
|
||||
evaluate_retval
|
||||
fi
|
||||
|
||||
# Remove a pid file that isn't done automatically
|
||||
boot_mesg "Removing the rpc.statd pid file if it exists"
|
||||
if [ -f /var/run/rpc.statd.pid ]; then
|
||||
rm -f /var/run/rpc.statd.pid
|
||||
fi
|
||||
;;
|
||||
|
||||
reload)
|
||||
boot_mesg "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 [ "$QUOTA" = "yes" ]; then
|
||||
statusproc rpc.rquotad
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|reload|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End /etc/init.d/nfs-server
|
||||
55
src/init.d/postfix
Normal file
55
src/init.d/postfix
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/bin/sh
|
||||
# Begin /etc/init.d/postfix
|
||||
|
||||
# Based on sysklogd script from LFS-3.1 and earlier.
|
||||
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
||||
|
||||
#$LastChangedBy: bdubbs $
|
||||
#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
|
||||
|
||||
. /etc/init.d/init-functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
boot_mesg "Starting Postfix..."
|
||||
loadproc /usr/sbin/postfix start
|
||||
;;
|
||||
|
||||
stop)
|
||||
boot_mesg "Stopping Postfix..."
|
||||
loadproc /usr/sbin/postfix stop
|
||||
;;
|
||||
|
||||
reload)
|
||||
boot_mesg "Reloading Postfix..."
|
||||
loadproc /usr/sbin/postfix reload
|
||||
;;
|
||||
|
||||
abort)
|
||||
boot_mesg "Aborting Postfix..."
|
||||
loadproc /usr/sbin/postfix abort
|
||||
;;
|
||||
|
||||
flush)
|
||||
boot_mesg "Flushing Postfix..."
|
||||
loadproc /usr/sbin/postfix flush
|
||||
;;
|
||||
|
||||
check)
|
||||
boot_mesg "Checking Postfix..."
|
||||
loadproc /usr/sbin/postfix check
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|reload|abort|flush|check|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End /etc/init.d/postfix
|
||||
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
# Begin /etc/init.d/samba
|
||||
|
||||
# Based on sysklogd script from LFS-3.1 and earlier.
|
||||
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
||||
|
||||
#$LastChangedBy: bdubbs $
|
||||
#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
|
||||
|
||||
. /etc/init.d/init-functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
boot_mesg "Starting nmbd..."
|
||||
loadproc /usr/sbin/nmbd -D
|
||||
|
||||
boot_mesg "Starting smbd..."
|
||||
loadproc /usr/sbin/smbd -D
|
||||
;;
|
||||
|
||||
stop)
|
||||
boot_mesg "Stopping smbd..."
|
||||
killproc /usr/sbin/smbd
|
||||
|
||||
boot_mesg "Stopping nmbd..."
|
||||
killproc /usr/sbin/nmbd
|
||||
;;
|
||||
|
||||
reload)
|
||||
boot_mesg "Reloading smbd..."
|
||||
reloadproc /usr/sbin/smbd
|
||||
|
||||
boot_mesg "Reloading nmbd..."
|
||||
reloadproc /usr/sbin/nmbd
|
||||
;;
|
||||
|
||||
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
|
||||
|
||||
49
src/init.d/winbind
Normal file
49
src/init.d/winbind
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
# Begin /etc/init.d/winbind
|
||||
|
||||
# Based on sysklogd script from LFS-3.1 and earlier.
|
||||
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
||||
|
||||
#$LastChangedBy: bdubbs $
|
||||
#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
|
||||
|
||||
. /etc/init.d/init-functions
|
||||
|
||||
PIDFILE="/var/run/winbindd.pid"
|
||||
KILLDELAY="10"
|
||||
|
||||
case "$1" in
|
||||
|
||||
start)
|
||||
boot_mesg "Starting winbind..."
|
||||
loadproc /usr/sbin/winbindd
|
||||
;;
|
||||
|
||||
stop)
|
||||
boot_mesg "Stopping winbind..."
|
||||
killproc -p ${PIDFILE} /usr/sbin/winbind
|
||||
;;
|
||||
|
||||
reload)
|
||||
boot_mesg "Reloading winbind..."
|
||||
reloadproc /usr/sbin/winbindd
|
||||
;;
|
||||
|
||||
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/winbind
|
||||
44
src/init.d/xinetd
Normal file
44
src/init.d/xinetd
Normal file
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
# Begin /etc/init.d/xinetd
|
||||
|
||||
# Based on sysklogd script from LFS-3.1 and earlier.
|
||||
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
||||
|
||||
#$LastChangedBy: bdubbs $
|
||||
#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
|
||||
|
||||
. /etc/init.d/init-functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
boot_mesg "Starting xinetd..."
|
||||
loadproc /usr/sbin/xinetd
|
||||
;;
|
||||
|
||||
stop)
|
||||
boot_mesg "Stopping xinetd..."
|
||||
killproc /usr/sbin/xinetd
|
||||
;;
|
||||
|
||||
reload)
|
||||
boot_mesg "Reloading xinetd..."
|
||||
reloadproc /usr/sbin/xinetd
|
||||
;;
|
||||
|
||||
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
|
||||
51
src/patches/squidGuard-1.2.0-ipfire.patch
Normal file
51
src/patches/squidGuard-1.2.0-ipfire.patch
Normal file
@@ -0,0 +1,51 @@
|
||||
diff -urN squidGuard-1.2.0_orig/configure.in squidGuard-1.2.0/configure.in
|
||||
--- squidGuard-1.2.0_orig/configure.in 2001-12-18 10:16:36.000000000 +0000
|
||||
+++ squidGuard-1.2.0/configure.in 2006-06-10 12:29:26.000000000 +0000
|
||||
@@ -71,7 +71,12 @@
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
-AC_CHECK_LIB(db,db_version,,[
|
||||
+AC_CHECK_LIB(db,db_version,,
|
||||
+AC_CHECK_LIB(db,db_version_4000,,
|
||||
+AC_CHECK_LIB(db,db_version_4001,,
|
||||
+AC_CHECK_LIB(db,db_version_4002,,
|
||||
+AC_CHECK_LIB(db,db_version_4003,,
|
||||
+AC_CHECK_LIB(db,db_version_4004,,[
|
||||
echo
|
||||
echo "** The Berkley DB library is required for squidGuard"
|
||||
echo " to compile. Get it from http://www.sleepycat.com"
|
||||
@@ -79,7 +84,7 @@
|
||||
echo " its location. (default is $dbprefix/BerkeleyDB)"
|
||||
echo
|
||||
exit 1
|
||||
- ])
|
||||
+ ]))))))
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
diff -urN squidGuard-1.2.0_orig/src/sgDb.c squidGuard-1.2.0/src/sgDb.c
|
||||
--- squidGuard-1.2.0_orig/src/sgDb.c 2001-05-14 13:40:12.000000000 +0000
|
||||
+++ squidGuard-1.2.0/src/sgDb.c 2006-06-10 12:27:04.000000000 +0000
|
||||
@@ -98,13 +98,21 @@
|
||||
if(createdb)
|
||||
flag = flag | DB_TRUNCATE;
|
||||
if ((ret =
|
||||
+#if DB_VERSION_MINOR == 1 || DB_VERSION_MINOR == 2 || DB_VERSION_MINOR == 3 || DB_VERSION_MINOR == 4
|
||||
+ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
|
||||
+#else
|
||||
Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
|
||||
+#endif
|
||||
(void) Db->dbp->close(Db->dbp, 0);
|
||||
sgLogFatalError("Error db_open: %s", strerror(ret));
|
||||
}
|
||||
} else {
|
||||
if ((ret =
|
||||
+#if DB_VERSION_MINOR == 1 || DB_VERSION_MINOR == 2 || DB_VERSION_MINOR == 3 || DB_VERSION_MINOR == 4
|
||||
+ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
|
||||
+#else
|
||||
Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
|
||||
+#endif
|
||||
sgLogFatalError("Error db_open: %s", strerror(ret));
|
||||
}
|
||||
}
|
||||
@@ -21,9 +21,7 @@
|
||||
# Copyright (C) 2004-01-19 Mark Wormgoor <mark@wormgoor.com>. #
|
||||
# #
|
||||
############################################################################
|
||||
#
|
||||
# $Id: makegraphs,v 1.19.2.18 2006/01/08 13:41:04 eoberlander Exp $
|
||||
#
|
||||
|
||||
use strict;
|
||||
#use warnings;
|
||||
|
||||
@@ -57,6 +55,7 @@ if ((${Lang::language} eq 'el') ||
|
||||
my $rrdlog = "/var/log/rrd";
|
||||
my $graphs = "/home/httpd/html/graphs";
|
||||
$ENV{PATH}="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin";
|
||||
my $hdd_device = "/dev/harddisk";
|
||||
|
||||
sub gettraffic {
|
||||
my $interface = $_[0];
|
||||
@@ -674,6 +673,75 @@ sub updatelqgraph {
|
||||
print "Error in RRD::graph for Link Quality: $ERROR\n" if $ERROR;
|
||||
}
|
||||
|
||||
sub updatehdddata
|
||||
{
|
||||
if ( ! -e "$rrdlog/hddtemp.rrd")
|
||||
{
|
||||
# database did not exist -> create
|
||||
RRDs::create ("$rrdlog/hddtemp.rrd", "--step=300",
|
||||
"DS:temperature:GAUGE:600:0:100",
|
||||
"RRA:AVERAGE:0.5:1:576",
|
||||
"RRA:AVERAGE:0.5:6:672",
|
||||
"RRA:AVERAGE:0.5:24:732",
|
||||
"RRA:AVERAGE:0.5:144:1460");
|
||||
$ERROR = RRDs::error;
|
||||
print "Error in RRD::create for hdd: $ERROR\n" if $ERROR;
|
||||
}
|
||||
|
||||
my $hdd_output = `/usr/sbin/hddtemp -qn $hdd_device`;
|
||||
|
||||
# I know 4 response possible responses:
|
||||
#
|
||||
# /dev/harddisk: harddisk type: S.M.A.R.T. not available
|
||||
# /dev/harddisk: harddisk type: no sensor
|
||||
# /dev/harddisk: harddisk type: 37<33>C or <20>F
|
||||
# 37
|
||||
|
||||
if ( index($hdd_output, "S.M.A.R.T.") != -1 )
|
||||
{
|
||||
$temp = 0;
|
||||
}
|
||||
elsif ( index($hdd_output, "no sensor") != -1 )
|
||||
{
|
||||
$temp = 1;
|
||||
}
|
||||
elsif ( index($hdd_output, "$hdd_device") != -1 )
|
||||
{
|
||||
$hdd_output =~ /.*:.*:\s*(\d+).*\s/;
|
||||
$temp = $1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hdd_output =~ /(\d+)\s/;
|
||||
$temp = $1;
|
||||
}
|
||||
|
||||
RRDs::update ("$rrdlog/hddtemp.rrd", "-t", "temperature", "N:$temp");
|
||||
|
||||
$ERROR = RRDs::error;
|
||||
print "Error in RRD::update for hdd: $ERROR\n" if $ERROR;
|
||||
}
|
||||
|
||||
sub updatehddgraph {
|
||||
my $period = $_[0];
|
||||
|
||||
RRDs::graph ("$graphs/hddtemp-$period.png",
|
||||
"--start", "-1$period", "-aPNG", "-i", "-z",
|
||||
"--alt-y-grid", "-w 600", "-h 100",
|
||||
"--color", "SHADEA#EAE9EE",
|
||||
"--color", "SHADEB#EAE9EE",
|
||||
"--color", "BACK#FFFFFF",
|
||||
"-t $tr{'harddisk temperature'} ($tr{'graph per'} $tr{$period})",
|
||||
"DEF:temperature=$rrdlog/hddtemp.rrd:temperature:AVERAGE",
|
||||
"LINE2:temperature#0000FF:$tr{'hdd temperature in'} <20>C",
|
||||
"GPRINT:temperature:MAX:$tr{'maximal'}\\:%3.0lf <20>C",
|
||||
"GPRINT:temperature:AVERAGE:$tr{'average'}\\:%3.0lf <20>C",
|
||||
"GPRINT:temperature:LAST:$tr{'current'}\\:%3.0lf <20>C",
|
||||
);
|
||||
$ERROR = RRDs::error;
|
||||
print "Error in RRD::graph for cpu: $ERROR\n" if $ERROR;
|
||||
}
|
||||
|
||||
## Update ipac logs
|
||||
system ('/usr/sbin/fetchipac');
|
||||
sleep 8;
|
||||
@@ -851,6 +919,15 @@ updatelqgraph("week");
|
||||
updatelqgraph("month");
|
||||
updatelqgraph("year");
|
||||
|
||||
###
|
||||
### HDDTEMP-Graphs for /dev/harddisk
|
||||
###
|
||||
updatehdddata();
|
||||
updatehddgraph ("day");
|
||||
updatehddgraph ("week");
|
||||
updatehddgraph ("month");
|
||||
updatehddgraph ("year");
|
||||
|
||||
###
|
||||
### Network Graphs
|
||||
###
|
||||
|
||||
66
src/scripts/vpn-restart
Normal file
66
src/scripts/vpn-restart
Normal file
@@ -0,0 +1,66 @@
|
||||
#!/bin/sh
|
||||
# VPN Restart/Checker by Figo
|
||||
|
||||
#####################################################
|
||||
part=xxxx #partner frei W<>hlbar
|
||||
net=xxxx.homeip.net #Partner DYNDNS Adresse
|
||||
vpn=xxxx #VPN Name wie unter GUI
|
||||
iplocal=192.168.x.x #Lokale IP
|
||||
ipremote=192.168.x.x #Partner IP
|
||||
LOGFILE=/var/log/vpn_$vpn.log
|
||||
maxlog=2000 #Max groesse des Logfiles in Byte
|
||||
#####################################################
|
||||
ping -c 3 $net
|
||||
if [ $? != 0 ] ; then
|
||||
clear
|
||||
echo "##############################################"
|
||||
echo "# $part ist offline #"
|
||||
echo "# Verbindung zu $part nicht moeglich #"
|
||||
echo "$(date) $part ist offline #" >> $LOGFILE
|
||||
echo "$(date) Verbindung zu $part nicht moeglich #" >> $LOGFILE
|
||||
echo "##############################################"
|
||||
else
|
||||
clear
|
||||
echo "##############################################"
|
||||
echo "# Na ein Glueck $part is online #"
|
||||
echo "##############################################"
|
||||
/usr/bin/ping -i 2 -c 2 -n -I $iplocal $ipremote
|
||||
if test $? -ne 0; then
|
||||
clear
|
||||
echo "##############################################"
|
||||
echo "# `grep -c ms $LOGFILE` #"
|
||||
echo "# $(date) #"
|
||||
echo "##############################################"
|
||||
echo "$(date) Tunnel zu $part ist NICHT da #" >> $LOGFILE
|
||||
echo "$(date) Starte Tunnel $vpn neu #" >> $LOGFILE
|
||||
echo "# Tunnel zu $part ist NICHT da #"
|
||||
echo "# Starte Tunnel $vpn neu #"
|
||||
echo "##############################################"
|
||||
ipsec auto --replace $vpn
|
||||
ipsec auto --rereadsecrets
|
||||
ipsec auto --up $vpn
|
||||
else
|
||||
clear
|
||||
echo "###############################################"
|
||||
echo "$(date) Tunnel zu $part steht #" >> $LOGFILE
|
||||
echo "# $(date) #"
|
||||
echo "# Tunnel zu $part steht #"
|
||||
echo " seine WAN IP ist `host $net | cut -d" " -f4` "
|
||||
echo "# seine Lokale IP ist $ipremote #"
|
||||
echo "###############################################"
|
||||
|
||||
|
||||
if test `stat -c %s $LOGFILE` -lt $maxlog; then
|
||||
echo "# $LOGFILE < $maxlog Bytes #"
|
||||
else
|
||||
echo "##############################################"
|
||||
echo "# $LOGFILE > $maxlog Bytes #"
|
||||
echo "# Maximale groesse des Logfile #"
|
||||
echo "# Logfile wird geloescht #"
|
||||
echo "##############################################"
|
||||
rm $LOGFILE
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
Reference in New Issue
Block a user