clfs-1.2
clfs-2.1
clfs-3.0.0-systemd
clfs-3.0.0-sysvinit
systemd
sysvinit
Last change
on this file since 49174f3 was 600339f5, checked in by Jim Gifford <clfs@…>, 19 years ago |
LCD Fixes
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | ########################################################################
|
---|
3 | # Begin $rc_base/init.d/setlcd
|
---|
4 | #
|
---|
5 | # Description : Show IP Addresses on LCD Panel
|
---|
6 | #
|
---|
7 | # Author : Jim Gifford - jim@linuxfromscratch.org
|
---|
8 | #
|
---|
9 | # Version : 00.00
|
---|
10 | #
|
---|
11 | # Notes :
|
---|
12 | #
|
---|
13 | ########################################################################
|
---|
14 |
|
---|
15 | . /etc/sysconfig/rc
|
---|
16 | . $rc_functions
|
---|
17 |
|
---|
18 | case "$1" in
|
---|
19 | start)
|
---|
20 | ip addr show dev eth0 > /dev/null 2>&1
|
---|
21 | if [ "$?" = "0" ]; then
|
---|
22 | IFACE1_IP="`ip addr show dev eth0 | grep inet | cut -d / -f 1 | cut -d t -f 2 | cut -d' ' -f 2 `"
|
---|
23 | IFACE1="$IFACE1_IP"
|
---|
24 | fi
|
---|
25 | ip addr show dev eth1 > /dev/null 2>&1
|
---|
26 | if [ "$?" = "0" ]; then
|
---|
27 | IFACE2_IP="`ip addr show dev eth1 | grep inet | cut -d / -f 1 | cut -d t -f 2 | cut -d' ' -f 2 `"
|
---|
28 | IFACE2="$IFACE2_IP"
|
---|
29 | fi
|
---|
30 | if [ "$IFACE2" = "" ]; then
|
---|
31 | $LCD_PROG "Lan1 $IFACE1"
|
---|
32 | else
|
---|
33 | $LCD_PROG "Lan1 $IFACE1" "Lan2 $IFACE2"
|
---|
34 | fi
|
---|
35 |
|
---|
36 | ;;
|
---|
37 |
|
---|
38 | stop)
|
---|
39 | $LCD_PROG " " " "
|
---|
40 | ;;
|
---|
41 |
|
---|
42 | restart)
|
---|
43 | ${0} stop
|
---|
44 | sleep 1
|
---|
45 | ${0} start
|
---|
46 | ;;
|
---|
47 |
|
---|
48 | *)
|
---|
49 | echo "Usage: {start|stop|restart}"
|
---|
50 | exit 1
|
---|
51 | ;;
|
---|
52 | esac
|
---|
53 |
|
---|
54 | # End $rc_base/init.d/setlcd
|
---|
55 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.