123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- diff --git a/UpdateRootfs.sh.in b/UpdateRootfs.sh.in
- index 00abca8..a826bc2 100644
- --- a/UpdateRootfs.sh.in
- +++ b/UpdateRootfs.sh.in
- @@ -1,7 +1,7 @@
- #!/bin/sh
-
- TMP_PATH="$GFA_PREFIX/__GfA_Update"
- -TAR_PARAMETERS="-C $GFA_PREFIX/ --exclude=./tmp --exclude=./etc/inittab --exclude=./etc/hosts --exclude=./etc/hostname --exclude=./etc/passwd --exclude=./etc/shadow --exclude=./etc/vncpwd --exclude=./etc/init.d/S99tincd --exclude=./etc/hostapd.conf --exclude=./root/.ssh --exclude=./etc/init.d/M99tincd --exclude=./var/GfA/Display_GSM.ini --exclude=./var/cron/crontabs/root -xzvf -"
- +TAR_PARAMETERS="-C $GFA_PREFIX/ --exclude=./tmp --exclude=./etc/network/interfaces --exclude=./etc/inittab --exclude=./etc/hosts --exclude=./etc/hostname --exclude=./etc/passwd --exclude=./etc/shadow --exclude=./etc/vncpwd --exclude=./etc/init.d/S99tincd --exclude=./etc/hostapd.conf --exclude=./root/.ssh --exclude=./etc/init.d/M99tincd --exclude=./var/GfA/Display_GSM.ini --exclude=./var/cron/crontabs/root -xzvf -"
-
- untar_payload ()
- {
- @@ -163,12 +163,6 @@ mount $bootpart $GFA_PREFIX/_GfABoot
-
- mkdir -p $TMP_PATH/bu_cfg
-
- -if [ -e $GFA_PREFIX/etc/network/interfaces ]
- -then
- - cp $GFA_PREFIX/etc/network/interfaces $TMP_PATH/bu_cfg
- - rm $GFA_PREFIX/etc/network/interfaces
- -fi
- -
- if [ -e $GFA_PREFIX/etc/wpa_supplicant.conf ]
- then
- cp $GFA_PREFIX/etc/wpa_supplicant.conf $TMP_PATH/bu_cfg/wpa_supplicant.conf_old
- @@ -188,50 +182,6 @@ untar_payload
- echo "sync mmc be patient ...."
- sync
- sync
- -# --- copy old eth0 configuration
- -INTERFACE="eth0"
- -IFCONFIG=$TMP_PATH/bu_cfg/interfaces
- -
- -(\
- -cat << EOF
- -# Configure Loopback
- -auto lo
- -iface lo inet loopback
- -
- -EOF
- -) > $GFA_PREFIX/etc/network/interfaces
- -
- -awk -v par=$INTERFACE '/^iface/ && $2==par {f=1}/^iface/ && $2!=par {f=0}f && !/^\s*#/d && !/^\s*$/d {print $0 }' $TMP_PATH/bu_cfg/interfaces \
- ->> $GFA_PREFIX/etc/network/interfaces
- -
- -(\
- -cat << EOF
- -iface eth1 inet dhcp
- -#---
- -iface usb0 inet static
- - address 192.168.7.2
- - netmask 255.255.255.252
- -#---
- -iface wlan0 inet dhcp
- - wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
- -#
- -EOF
- -) >> $GFA_PREFIX/etc/network/interfaces
- -
- -FIXINTERFACES=$(
- -cat $GFA_PREFIX/etc/network/interfaces |
- -awk '
- -{
- -# remove old version of resolv.conf filling
- -if( ($1 == "post-up") && ($2 == "echo") && ($3 == "\"nameserver")) {
- - printf("\tdns-nameservers %s\n", substr($4,1,length($4) - 1));
- - } else {
- - printf("%s\n", $0);
- - }
- -
- -}'
- -)
- -echo "$FIXINTERFACES" > $GFA_PREFIX/etc/network/interfaces
-
- if [ -e $GFA_PREFIX/etc/init.d/S98usb_g_ether ]
- then
- @@ -714,12 +664,6 @@ rm -rf \$TMP_PATH
- mkdir -p \$TMP_PATH
- mkdir -p \$TMP_PATH/bu_cfg
-
- -if [ -e \$GFA_PREFIX/etc/network/interfaces ]
- -then
- - cp \$GFA_PREFIX/etc/network/interfaces \$TMP_PATH/bu_cfg
- - rm \$GFA_PREFIX/etc/network/interfaces
- -fi
- -
- if [ -e \$GFA_PREFIX/etc/wpa_supplicant.conf ]
- then
- cp \$GFA_PREFIX/etc/wpa_supplicant.conf \$TMP_PATH/bu_cfg/wpa_supplicant.conf_old
- @@ -752,52 +696,6 @@ rsync -avR --exclude=/_GfABoot \\
- --exclude=./var/cron/crontabs/root \\
- ./ \$EMMC_ROOTPATH/
-
- -# --- copy old eth0 configuration
- -INTERFACE="eth0"
- -IFCONFIG=\$TMP_PATH/bu_cfg/interfaces
- -
- -(\\
- -cat << EOF
- -# Configure Loopback
- -auto lo
- -iface lo inet loopback
- -
- -EOF
- -) > \$GFA_PREFIX/etc/network/interfaces
- -
- -
- -awk -v par=\$INTERFACE '/^iface/ && \$2==par {f=1}/^iface/ && \$2!=par {f=0}f && !/^\s*#/d && !/^\s*\$/d {print \$0 }' \$TMP_PATH/bu_cfg/interfaces \\
- ->> \$GFA_PREFIX/etc/network/interfaces
- -
- -(\\
- -cat << EOF
- -iface eth1 inet dhcp
- -#---
- -iface usb0 inet static
- - address 192.168.7.2
- - netmask 255.255.255.252
- -#---
- -iface wlan0 inet dhcp
- - wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
- -#
- -EOF
- -) >> \$GFA_PREFIX/etc/network/interfaces
- -
- -FIXINTERFACES=\$(
- -cat \$GFA_PREFIX/etc/network/interfaces |
- -awk '
- -{
- -# remove old version of resolv.conf filling
- -if( (\$1 == "post-up") && (\$2 == "echo") && (\$3 == "\"nameserver")) {
- - printf("\tdns-nameservers %s\n", substr(\$4,1,length(\$4) - 1));
- - } else {
- - printf("%s\n", \$0);
- - }
- -
- -}'
- -)
- -echo "\$FIXINTERFACES" > \$GFA_PREFIX/etc/network/interfaces
- -
- if [ -e \$GFA_PREFIX/etc/init.d/S98usb_g_ether ]
- then
- cp \$GFA_PREFIX/etc/init.d/S98usb_g_ether \$GFA_PREFIX/etc/init.d/M98usb_g_ether
|