Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into monit

Conflicts:
	config/etc/logrotate.conf
This commit is contained in:
Dirk Wagner
2015-01-06 15:51:29 +01:00
584 changed files with 45455 additions and 77180 deletions

View File

@@ -17,26 +17,8 @@
. ${rc_functions}
eval $(/usr/local/bin/readhash /var/ipfire/main/settings)
# English is default
FONT="lat0-16"
FONT="LatArCyrHeb-16"
KEYMAP_CORRECTIONS="euro2"
case "${LANGUAGE}" in
# German
de)
LEGACY_CHARSET="iso-8859-15"
FONT="lat0-16 -m 8859-15"
;;
# Polish
pl)
FONT="lat2-16"
;;
# Russish/Turkish
ru|tr)
FONT="LatArCyrHeb-16"
;;
esac
UNICODE="1"
BROKEN_COMPOSE="0"

0
src/initscripts/init.d/dhcrelay Executable file → Normal file
View File

View File

@@ -104,6 +104,12 @@ iptables_init() {
iptables -t nat -N CUSTOMPOSTROUTING
iptables -t nat -A POSTROUTING -j CUSTOMPOSTROUTING
# P2PBLOCK
iptables -N P2PBLOCK
iptables -A INPUT -j P2PBLOCK
iptables -A FORWARD -j P2PBLOCK
iptables -A OUTPUT -j P2PBLOCK
# Guardian (IPS) chains
iptables -N GUARDIAN
iptables -A INPUT -j GUARDIAN

View File

@@ -28,7 +28,7 @@ ser_console $cmdline
#
/etc/init.d/sysklogd start
export LANG=en_US.utf8
/usr/local/sbin/setup /dev/tty2 INSTALL
/usr/sbin/setup /dev/tty2 INSTALL
if [ "${?}" == "1" ]; then
echo Setup not finished. Rebooting ...
reboot -f

View File

@@ -17,22 +17,24 @@
case "${1}" in
start)
boot_mesg "Background Autoresize root partition to use the whole drive"
# Detect device
ROOT=`mount | grep -m1 " / " | cut -d" " -f1`;
DRV=${ROOT::`expr length $ROOT`-1}
if [ -e "/.resizefs" ]; then
boot_mesg "Re-sizing root partition..."
boot_mesg "resize ${DRV}3 ..."
nice -n 19 $0 background ${DRV}3 > /dev/null &
;;
background)
resize2fs -p $2
# Find root device
mount | while read -r dev tmp1 mountpoint tmp2; do
# Skip generic entries
[ "${dev}" = "rootfs" ] && continue
# Erase symlink, it should run only once
rm -f /etc/rc.d/rcsysinit.d/S42fsresize
sync
exit 0;
if [ "${mountpoint}" = "/" ]; then
# Resize filesystem
resize2fs -p "${dev}"
# Remove marker
rm -f /.resizefs
break
fi
done
fi
;;
*)

View File

@@ -1,47 +0,0 @@
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/mdadm
#
# Description : This script controls software Raid
#
# Authors : Dirk Hoefle <dhoefle@gmx.net>
#
# Version : 01.00
#
# Notes :
#
########################################################################
. /etc/sysconfig/rc
. ${rc_functions}
case "${1}" in
start)
boot_mesg "Scan/assemble mdadm raid devices..."
mdadm --assemble --scan
echo_ok
;;
stop)
boot_mesg "Stopping Raid devices..."
mdadm --stop --scan
echo_ok
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
cat /proc/mdstat
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/mdadm

View File

@@ -0,0 +1,33 @@
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/mounttmpfs
#
# Description : Mount tmpfses
#
########################################################################
. /etc/sysconfig/rc
. ${rc_functions}
case "${1}" in
start)
boot_mesg -n "Mounting ramdisk file systems:" ${INFO}
if ! mountpoint /var/lock &>/dev/null; then
boot_mesg -n " /var/lock" ${NORMAL}
mount -n -t tmpfs -o nosuid,nodev,size=8M /var/lock /var/lock || failed=1
fi
boot_mesg "" ${NORMAL}
(exit ${failed})
evaluate_retval
;;
*)
echo "Usage: ${0} {start}"
exit 1
;;
esac
# End $rc_base/init.d/mounttmpfs

View File

@@ -17,40 +17,54 @@
case "${1}" in
start)
if [ -e "/.partresize" ]; then
boot_mesg "Mounting root file system in read/write mode ..."
mount -o remount,rw / > /dev/null
evaluate_retval
boot_mesg "Mounting root file system in read/write mode ..."
mount -o remount,rw / > /dev/null
evaluate_retval
boot_mesg "Create /etc/mtab..."
> /etc/mtab
mount -f / || failed=1
(exit ${failed})
evaluate_retval
boot_mesg "Create /etc/mtab..."
> /etc/mtab
mount -f / || failed=1
(exit ${failed})
evaluate_retval
# Detect device
mount | while read -r dev tmp1 mountpoint tmp2; do
[ "${dev}" = "rootfs" ] && continue
# Detect device
ROOT=`mount | grep -m1 " / " | cut -d" " -f1`;
if [ "${ROOT:`expr length $ROOT`-2:1}" == "p" ]; then
DRV=${ROOT::`expr length $ROOT`-2}
else
DRV=${ROOT::`expr length $ROOT`-1}
if [ "${mountpoint}" = "/" ]; then
# Find root partition number
part_num="${dev: -1}"
# Find path to the root device
root_dev="${dev::-1}"
if [ ! -b "${dev::-1}" -a "${root_dev: -1}" = "p" ]; then
root_dev="${dev::-2}"
fi
boot_mesg "Growing root partition to maximum size..."
echo -e ',+' | sfdisk --no-reread -f -N${part_num} "${root_dev}" 2>/dev/null
# Update c,h,s values of the boot partition...
if [ ${part_num} -ne 1 -a -b "${root_dev}1" ]; then
echo -e ',' | sfdisk --no-reread -f -N1 ${DRV} &> /dev/null
fi
# The filesystem should be resized after
# this operation
touch /.resizefs
# Remove marker
rm -f /.partresize
# Reboot
boot_mesg "Rebooting system..."
mount -o remount,ro / &>/dev/null
sleep 15
reboot -f
fi
done
fi
boot_mesg "Change Partition ${DRV}3 to all free space ..."
echo -e ',+' | sfdisk --no-reread -f -N3 ${DRV} 2>/dev/null
boot_mesg "Update c,h,s values of ${DRV}1 ..."
echo -e ',' | sfdisk --no-reread -f -N1 ${DRV} &> /dev/null
# Erase symlink, it should run only once
rm -f /etc/rc.d/rcsysinit.d/S25partresize
boot_mesg "Rebooting ..."
sync
mount -o remount,ro / &> /dev/null
sleep 15
reboot -f
;;
*)
echo "Usage: ${0} {start}"

View File

@@ -68,6 +68,10 @@ case "$1" in
evaluate_retval
;;
restore)
if ! mountpoint $RRDLOG &>/dev/null; then
mount -t tmpfs -o size=64M none "$RRDLOG"
fi
if [ -e $RRDLOG.bak/cron/new.root ]; then
if [ -e $RRDLOG.bak/cron/root ]; then
rm -f $RRDLOG.bak/cron/new.root