From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, thirteen, updated. e54330e01e20314f796543d2d2e5eb34ee43caf3
Date: Thu, 20 Dec 2012 21:03:12 +0100 [thread overview]
Message-ID: <20121220200312.8BDCC200CA@argus.ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 11279 bytes --]
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, thirteen has been updated
via e54330e01e20314f796543d2d2e5eb34ee43caf3 (commit)
via d1cc6eaac8d8d27f69c13c43557166a679fa3d44 (commit)
via acddae55daa17a8f08953e6a163194c6e942391e (commit)
via 360378014d0ba62c1ced4b204080f05c2a3de575 (commit)
via 4f6e3ae3b8768819b2fc9807d17a1c4e04e7478e (commit)
from 91b20d84de68c80e230838e81a470c7bf5d3457b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e54330e01e20314f796543d2d2e5eb34ee43caf3
Merge: d1cc6ea 91b20d8
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Thu Dec 20 21:02:50 2012 +0100
Merge branch 'thirteen' of ssh://git.ipfire.org/pub/git/ipfire-2.x into thirteen
commit d1cc6eaac8d8d27f69c13c43557166a679fa3d44
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Thu Dec 20 20:59:16 2012 +0100
leds: new led startup script.
Added setups for dreamplug, Iomega iConnect and Raidsonic ICY-Box 62x0
and a functionality to replace the script by a user copy for adding other
led configurations.
commit acddae55daa17a8f08953e6a163194c6e942391e
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Wed Dec 19 22:55:58 2012 +0100
leds: disable all led's at halt.
commit 360378014d0ba62c1ced4b204080f05c2a3de575
Merge: a57072e 4f6e3ae
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date: Mon Dec 17 22:52:28 2012 +0100
Merge remote-tracking branch 'origin/next' into thirteen
-----------------------------------------------------------------------
Summary of changes:
config/rootfiles/common/armv5tel/initscripts | 1 +
config/rootfiles/common/i586/initscripts | 1 +
config/rootfiles/core/66/filelists/files | 2 +
html/cgi-bin/ovpnmain.cgi | 10 +-
src/initscripts/init.d/halt | 8 ++
src/initscripts/init.d/leds | 115 +++++++++++++++--------
src/initscripts/init.d/mountfs | 4 +-
src/initscripts/init.d/networking/red.up/98-leds | 3 +
8 files changed, 100 insertions(+), 44 deletions(-)
create mode 100644 src/initscripts/init.d/networking/red.up/98-leds
Difference in files:
diff --git a/config/rootfiles/common/armv5tel/initscripts b/config/rootfiles/common/armv5tel/initscripts
index 89e8b22..90f9be1 100644
--- a/config/rootfiles/common/armv5tel/initscripts
+++ b/config/rootfiles/common/armv5tel/initscripts
@@ -87,6 +87,7 @@ etc/rc.d/init.d/networking/red.up/30-ddns
etc/rc.d/init.d/networking/red.up/40-ipac
etc/rc.d/init.d/networking/red.up/50-ipsec
etc/rc.d/init.d/networking/red.up/50-ovpn
+etc/rc.d/init.d/networking/red.up/98-leds
etc/rc.d/init.d/networking/red.up/99-U-dialctrl.pl
etc/rc.d/init.d/networking/red.up/99-fireinfo
etc/rc.d/init.d/networking/red.up/99-pakfire-update
diff --git a/config/rootfiles/common/i586/initscripts b/config/rootfiles/common/i586/initscripts
index 5bc93d7..737e878 100644
--- a/config/rootfiles/common/i586/initscripts
+++ b/config/rootfiles/common/i586/initscripts
@@ -89,6 +89,7 @@ etc/rc.d/init.d/networking/red.up/30-ddns
etc/rc.d/init.d/networking/red.up/40-ipac
etc/rc.d/init.d/networking/red.up/50-ipsec
etc/rc.d/init.d/networking/red.up/50-ovpn
+etc/rc.d/init.d/networking/red.up/98-leds
etc/rc.d/init.d/networking/red.up/99-U-dialctrl.pl
etc/rc.d/init.d/networking/red.up/99-fireinfo
etc/rc.d/init.d/networking/red.up/99-pakfire-update
diff --git a/config/rootfiles/core/66/filelists/files b/config/rootfiles/core/66/filelists/files
index d923c5b..3f9acf5 100644
--- a/config/rootfiles/core/66/filelists/files
+++ b/config/rootfiles/core/66/filelists/files
@@ -3,8 +3,10 @@ etc/issue
etc/rc.d/init.d/firewall
etc/rc.d/init.d/fsresize
etc/rc.d/init.d/halt
+etc/rc.d/init.d/leds
etc/rc.d/init.d/mountfs
etc/rc.d/init.d/network
+etc/rc.d/init.d/networking/red.up/98-leds
etc/rc.d/init.d/partresize
etc/rc.d/init.d/reboot
etc/rc.d/init.d/sendsignals
diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
index 2b0c4ba..6def979 100755
--- a/html/cgi-bin/ovpnmain.cgi
+++ b/html/cgi-bin/ovpnmain.cgi
@@ -2101,20 +2101,20 @@ else
print CLIENTCONF "#OpenVPN Client conf\r\n";
print CLIENTCONF "tls-client\r\n";
print CLIENTCONF "client\r\n";
- print CLIENTCONF "nobind\n";
+ print CLIENTCONF "nobind\r\n";
print CLIENTCONF "dev $vpnsettings{'DDEVICE'}\r\n";
print CLIENTCONF "proto $vpnsettings{'DPROTOCOL'}\r\n";
# Check if we are using fragment, mssfix or mtu-disc and set MTU to 1500
# or use configured value.
if ($vpnsettings{FRAGMENT} ne '' && $vpnsettings{DPROTOCOL} ne 'tcp' )
- { print CLIENTCONF "$vpnsettings{'DDEVICE'}-mtu 1500\n"; }
+ { print CLIENTCONF "$vpnsettings{'DDEVICE'}-mtu 1500\r\n"; }
elsif ($vpnsettings{MSSFIX} eq 'on')
- { print CLIENTCONF "$vpnsettings{'DDEVICE'}-mtu 1500\n"; }
+ { print CLIENTCONF "$vpnsettings{'DDEVICE'}-mtu 1500\r\n"; }
elsif (($vpnsettings{'PMTU_DISCOVERY'} eq 'yes') ||
($vpnsettings{'PMTU_DISCOVERY'} eq 'maybe') ||
($vpnsettings{'PMTU_DISCOVERY'} eq 'no' ))
- { print CLIENTCONF "$vpnsettings{'DDEVICE'}-mtu 1500\n"; }
+ { print CLIENTCONF "$vpnsettings{'DDEVICE'}-mtu 1500\r\n"; }
else
{ print CLIENTCONF "$vpnsettings{'DDEVICE'}-mtu $vpnsettings{'DMTU'}\r\n"; }
@@ -2167,7 +2167,7 @@ else
($vpnsettings{'PMTU_DISCOVERY'} eq 'maybe') ||
($vpnsettings{'PMTU_DISCOVERY'} eq 'no' )) {
if(($vpnsettings{MSSFIX} ne 'on') || ($vpnsettings{FRAGMENT} eq '')) {
- print CLIENTCONF "mtu-disc $vpnsettings{'PMTU_DISCOVERY'}\n";
+ print CLIENTCONF "mtu-disc $vpnsettings{'PMTU_DISCOVERY'}\r\n";
}
}
close(CLIENTCONF);
diff --git a/src/initscripts/init.d/halt b/src/initscripts/init.d/halt
index 01f7234..a3005c9 100644
--- a/src/initscripts/init.d/halt
+++ b/src/initscripts/init.d/halt
@@ -21,8 +21,16 @@ case "${1}" in
boot_mesg "Remount root readonly..."
mount -f -o remount,ro / > /dev/null 2>&1
evaluate_retval
+
boot_mesg "Prepare for halt..."
sleep 2
+
+ #Disable all leds at shutdown
+ for led in $(ls /sys/class/leds); do
+ echo "none" > /sys/class/leds/$led/trigger
+ echo "0" > /sys/class/leds/$led/brightness
+ done
+
halt -d -f -i -p
;;
*)
diff --git a/src/initscripts/init.d/leds b/src/initscripts/init.d/leds
index 4e678c5..8183829 100644
--- a/src/initscripts/init.d/leds
+++ b/src/initscripts/init.d/leds
@@ -9,62 +9,101 @@
. /etc/sysconfig/rc
. ${rc_functions}
+if [ -e $0.user ]; then
+ $0.user $*
+ exit ${?}
+fi
+
# Load ethernet settings
eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
-setup_red_modem() {
- local led1=${1}
- local led2=${2}
-
- modprobe ledtrig-netdev
+if [ "${RED_DEV}" == "" ]; then
+ RED_DEV=ppp0
+fi
- local i
- for i in ${led1} ${led2}; do
- echo "netdev" > ${i}/trigger
- echo "${RED_DEV}" > ${i}/device_name
- done
+# setup_netdev_trigger LED DEVICE MODE
+setup_netdev_trigger ()
+{
+ if [ -d "/sys/class/leds/$1" ]; then
+ modprobe -q ledtrig-netdev 2>&1 > /dev/null
+ echo "netdev" > /sys/class/leds/$1/trigger
+ echo "$2" > /sys/class/leds/$1/device_name
+ echo "$3 $4" > /sys/class/leds/$1/mode
+ fi
+}
- echo "rx" > ${led1}/mode
- echo "tx" > ${led2}/mode
+# setup_netdev_trigger LED
+setup_heartbeat_trigger ()
+{
+ if [ -d "/sys/class/leds/$1" ]; then
+ modprobe -q ledtrig-heartbeat 2>&1 > /dev/null
+ echo "heartbeat" > /sys/class/leds/$1/trigger
+ fi
}
-reset_trigger() {
- [ -d "${1}" ] || return 0
- echo "none" > ${1}/trigger
+# disable_led_trigger LED
+disable_led_trigger ()
+{
+ if [ -d "/sys/class/leds/$1" ]; then
+ echo "none" > /sys/class/leds/$1/trigger
+ echo "0" > /sys/class/leds/$1/brightness
+ fi
}
-start_alix2() {
- modprobe -q leds-alix2 &>/dev/null
+case "${1}" in
+ start)
+ # Alix LED start
+ setup_netdev_trigger alix:2 ${RED_DEV} rx
+ setup_netdev_trigger alix:3 ${RED_DEV} tx
- local i
- for i in 1 2 3; do
- if [ ! -d "/sys/class/leds/alix:${i}" ]; then
- return 1
- fi
- done
+ # Dreamplug
+ setup_netdev_trigger dreamplug:green:wlan ${GREEN_DEV} tx rx
+ setup_netdev_trigger dreamplug:blue:wlanap ${BLUE_DEV} tx rx
+ setup_netdev_trigger dreamplug:blue:bluetooth ${RED_DEV} tx rx
- setup_red_modem /sys/class/leds/alix:2 /sys/class/leds/alix:3
-}
+ # Iomega iConnect start
+ setup_heartbeat_trigger iconnect:blue:otb
+ setup_netdev_trigger iconnect:blue:power ${RED_DEV} rx
+ setup_netdev_trigger iconnect:red:power ${RED_DEV} tx
+ setup_netdev_trigger iconnect:blue:usb_2 ${GREEN_DEV} tx rx
+ setup_netdev_trigger iconnect:blue:usb_3 ${BLUE_DEV} tx rx
+ setup_netdev_trigger iconnect:blue:usb_4 ${ORANGE_DEV} tx rx
-stop_alix2() {
- local i
- for i in 1 2 3; do
- reset_trigger /sys/class/leds/alix:${i}
- done
-}
+ # ICY Box LED start
+ setup_netdev_trigger nas6210:red:power ${RED_DEV} tx rx
+ setup_netdev_trigger nas6210:red:usb_copy ${GREEN_DEV} tx rx
+
+ exit 0
+ ;;
+
+ stop)
+ # Alix LED stop
+ disable_led_trigger alix:2
+ disable_led_trigger alix:3
+
+ # Dreamplug
+ disable_led_trigger dreamplug:green:wlan
+ disable_led_trigger dreamplug:blue:wlanap
+ disable_led_trigger dreamplug:blue:bluetooth
+
+ # Iomega iConnect stop (heartbeat will leave on)
+ disable_led_trigger iconnect:blue:power
+ disable_led_trigger iconnect:red:power
+ disable_led_trigger iconnect:blue:usb_2
+ disable_led_trigger iconnect:blue:usb_3
+ disable_led_trigger iconnect:blue:usb_4
+
+ # ICY Box LED stop
+ disable_led_trigger nas6210:red:power
+ disable_led_trigger nas6210:red:usb_copy
-case "${1}" in
- start|stop)
- for i in alix2; do
- ${1}_${i}
- done
exit 0
- ;;
+ ;;
*)
echo "Usage: ${0} {start|stop}"
exit 1
- ;;
+ ;;
esac
# End $rc_base/init.d/leds
diff --git a/src/initscripts/init.d/mountfs b/src/initscripts/init.d/mountfs
index c561009..d4735d5 100644
--- a/src/initscripts/init.d/mountfs
+++ b/src/initscripts/init.d/mountfs
@@ -49,8 +49,10 @@ case "${1}" in
boot_mesg "Unmounting all other currently mounted file systems..."
umount -a -d -r &>/dev/null
evaluate_retval
- ;;
+ # mount /sys again for led control at halt
+ mount /sys 2>&1 >/dev/null
+ ;;
*)
echo "Usage: ${0} {start|stop}"
exit 1
diff --git a/src/initscripts/init.d/networking/red.up/98-leds b/src/initscripts/init.d/networking/red.up/98-leds
new file mode 100644
index 0000000..825b46f
--- /dev/null
+++ b/src/initscripts/init.d/networking/red.up/98-leds
@@ -0,0 +1,3 @@
+#!/bin/bash
+/etc/init.d/leds start &>/dev/null
+exit 0
hooks/post-receive
--
IPFire 2.x development tree
reply other threads:[~2012-12-20 20:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121220200312.8BDCC200CA@argus.ipfire.org \
--to=git@ipfire.org \
--cc=ipfire-scm@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox