41 | | * /tftpboot/node_root/sbin/init 是由 /opt/drbl/setup/files/misc/init.drbl 拷貝而來,因此如果要 patch 的話,應該先 patch /opt/drbl/setup/files/misc/init.drbl 這個檔案,如此未來只要跑 drblsrv 或 drblsrv-offline 均會把 br* 加入考慮。 |
42 | | {{{ |
43 | | #!diff |
44 | | --- /opt/drbl/setup/files/misc/init.drbl.org 2011-09-29 12:04:10.000000000 +0800 |
45 | | +++ /opt/drbl/setup/files/misc/init.drbl 2011-09-29 12:04:33.000000000 +0800 |
46 | | @@ -158,7 +158,7 @@ |
47 | | create_dev |
48 | | |
49 | | # find my IP address |
50 | | -NETDEVICES="$(cat /proc/net/dev | awk -F: '/eth.:|tr.:/{print $1}')" |
51 | | +NETDEVICES="$(cat /proc/net/dev | awk -F: '/eth.:|tr.:|br.:/{print $1}')" |
52 | | for DEVICE in $NETDEVICES; do |
53 | | IP_tmp="$(ifconfig $DEVICE | grep -A1 $DEVICE | grep -v $DEVICE | grep "inet addr" | sed -e 's/^.*inet addr:\([0-9\.]\+\).*$/\1/')" |
54 | | if [ -n "$IP_tmp" ]; then |
55 | | }}} |
56 | | --- |
| 85 | * 若要維持 br* 的作法,必須修正 /sbin/init 的程式碼。 |
| 86 | * /tftpboot/node_root/sbin/init 是由 /opt/drbl/setup/files/misc/init.drbl 拷貝而來,因此如果要 patch 的話,應該先 patch /opt/drbl/setup/files/misc/init.drbl 這個檔案,如此未來只要跑 drblsrv 或 drblsrv-offline 均會把 br* 加入考慮。 |
| 87 | {{{ |
| 88 | #!diff |
| 89 | --- /opt/drbl/setup/files/misc/init.drbl.org 2011-09-29 12:04:10.000000000 +0800 |
| 90 | +++ /opt/drbl/setup/files/misc/init.drbl 2011-09-29 12:04:33.000000000 +0800 |
| 91 | @@ -158,7 +158,7 @@ |
| 92 | create_dev |
| 93 | |
| 94 | # find my IP address |
| 95 | -NETDEVICES="$(cat /proc/net/dev | awk -F: '/eth.:|tr.:/{print $1}')" |
| 96 | +NETDEVICES="$(cat /proc/net/dev | awk -F: '/eth.:|tr.:|br.:/{print $1}')" |
| 97 | for DEVICE in $NETDEVICES; do |
| 98 | IP_tmp="$(ifconfig $DEVICE | grep -A1 $DEVICE | grep -v $DEVICE | grep "inet addr" | sed -e 's/^.*inet addr:\([0-9\.]\+\).*$/\1/')" |
| 99 | if [ -n "$IP_tmp" ]; then |
| 100 | }}} |
| 101 | |
| 102 | ---- |
| 103 | |