Merge remote-tracking branch 'origin/next' into thirteen

Conflicts:
	lfs/php
	make.sh
This commit is contained in:
Arne Fitzenreiter
2012-09-06 12:36:18 +02:00
34 changed files with 1850 additions and 415 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

48
src/initscripts/init.d/minidlna Executable file
View File

@@ -0,0 +1,48 @@
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/minidlna
#
# Description : minidlna - UPNP/DLNA streaming server
#
# Authors : Michael Tremer <michael.tremer@ipfire.org>
#
# Version : 01.00
#
########################################################################
. /etc/sysconfig/rc
. ${rc_functions}
case "${1}" in
start)
boot_mesg "Starting minidlna..."
loadproc /usr/sbin/minidlna
;;
stop)
boot_mesg "Stopping minidlna..."
killproc /usr/sbin/minidlna
;;
reload)
boot_mesg "Reloading minidlna..."
reloadproc /usr/sbin/minidlna
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
statusproc /usr/sbin/minidlna
;;
*)
echo "Usage: ${0} {start|stop|reload|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/minidlna

View File

@@ -0,0 +1,101 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2012 IPFire Team <info@ipfire.org> #
# #
############################################################################
CONFIG_FILE="/var/ipfire/ethernet/vlans"
# Skip immediately if no configuration file has been found.
[ -e "${CONFIG_FILE}" ] || exit 0
eval $(readhash ${CONFIG_FILE})
# This is start or stop.
action=${1}
for interface in green0 blue0 orange0; do
case "${interface}" in
green*)
PARENT_DEV=${GREEN_PARENT_DEV}
VLAN_ID=${GREEN_VLAN_ID}
MAC_ADDRESS=${GREEN_MAC_ADDRESS}
;;
blue*)
PARENT_DEV=${BLUE_PARENT_DEV}
VLAN_ID=${BLUE_VLAN_ID}
MAC_ADDRESS=${BLUE_MAC_ADDRESS}
;;
orange*)
PARENT_DEV=${ORANGE_PARENT_DEV}
VLAN_ID=${ORANGE_VLAN_ID}
MAC_ADDRESS=${ORANGE_MAC_ADDRESS}
;;
esac
case "${action}" in
start)
# Check if the interface does already exists.
# If so, we skip creating it.
if [ -d "/sys/class/net/${interface}" ]; then
echo "Interface ${interface} already exists."
continue
fi
# Check if the parent interface exists.
if [ -z "${PARENT_DEV}" ] || [ ! -d "/sys/class/net/${PARENT_DEV}" ]; then
echo "${interface}: Parent device is not set or does not exist: ${PARENT_DEV}"
continue
fi
if [ -z "${VLAN_ID}" ]; then
echo "${interface}: You did not set the VLAN ID."
continue
fi
echo "Creating VLAN interface ${interface}..."
vconfig add ${PARENT_DEV} ${VLAN_ID}
ip link set ${PARENT_DEV}.${VLAN_ID} name ${interface}
if [ -n "${MAC_ADDRESS}" ]; then
ip link set ${interface} address ${MAC_ADDRESS}
fi
# Bring up the parent device.
ip link set ${PARENT_DEV} up
;;
stop)
if [ ! -e "/proc/net/vlan/${interface}" ]; then
echo "${interface} is not a VLAN interface. Skipping."
continue
fi
echo "Removing VLAN interface ${interface}..."
ip link set ${interface} down
vconfig rem ${interface}
;;
*)
echo "Invalid action: ${action}"
exit 1
;;
esac
done

View File

@@ -0,0 +1,32 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
extract_files
[ -d /var/mp3 ] || ( mkdir /var/mp3 && chown nobody.nobody /var/mp3 )
start_service ${NAME}
ln -svf ../init.d/minidlna /etc/rc.d/rc0.d/K00minidlna
ln -svf ../init.d/minidlna /etc/rc.d/rc3.d/S99minidlna
ln -svf ../init.d/minidlna /etc/rc.d/rc6.d/K00minidlna

View File

@@ -0,0 +1,27 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
stop_service ${NAME}
remove_files
rm -rf /etc/rc.d/rc*.d/*minidlna

View File

@@ -0,0 +1,25 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
./uninstall.sh
./install.sh

View File

@@ -1,17 +0,0 @@
diff -up apcupsd-3.14.5/src/apcaccess.c.gcc44 apcupsd-3.14.5/src/apcaccess.c
--- apcupsd-3.14.5/src/apcaccess.c.gcc44 2009-02-24 10:36:35.781325750 +0100
+++ apcupsd-3.14.5/src/apcaccess.c 2009-02-24 10:38:12.416285478 +0100
@@ -86,10 +86,10 @@ int main(int argc, char **argv)
}
if (argc > 2) { /* assume host:port */
- char *p;
+ char *p = argv[2];
- host = argv[2];
- p = strchr(host, ':');
+ host = p;
+ p = strchr(p, ':');
if (p) {
*p++ = 0;
port = atoi(p);