setup-uboot-env-*: replace ifconfig with ip addr show
PATCH 1/1 setup-uboot-env-*: replace ifconfig with ip addr show
Simple ifconfig has been deprecated for quite some time in favor of ip tools. New distros no longer package ifconfig, so use ip addr show command instead.
Signed-off-by Denys Dmytriyenko <[email protected]>
Cc Andreas Dannenberg <[email protected]>
--- setup-uboot-env-am18x.sh | 2 +- setup-uboot-env-am335x.sh | 2 +- setup-uboot-env-am3517.sh | 2 +- setup-uboot-env-am37x.sh | 2 +- setup-uboot-env-am43x.sh | 2 +- setup-uboot-env-am57xx-evm.sh | 2 +- setup-uboot-env-am65x.sh | 2 +- setup-uboot-env-beagleboard.sh | 2 +- setup-uboot-env-k2g-evm.sh | 2 +- setup-uboot-env-keystone.sh | 2 +- setup-uboot-env-omap5.sh | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-)
setup-uboot-env-am18x.sh +1 -1
@@ -42,7 +42,7 @@ SDKinstall=`grep TI_SDK_PATH= $cwd/../Rules.make | cut -d= -f2` dstdefault=$SDKinstall/targetNFS -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` prompt=" >"
setup-uboot-env-am335x.sh +1 -1
@@ -51,7 +51,7 @@ echo "-------------------------------------------------------------------------- echo "This step will set up the U-Boot variables for booting the EVM." echo -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` # Configure prompt for U-Boot 2016.05
setup-uboot-env-am3517.sh +1 -1
@@ -37,7 +37,7 @@ echo echo "--------------------------------------------------------------------------------" echo "This step will set up the u-boot variables for booting the EVM." -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` prompt="EVM #"
setup-uboot-env-am37x.sh +1 -1
@@ -37,7 +37,7 @@ echo echo "--------------------------------------------------------------------------------" echo "This step will set up the u-boot variables for booting the EVM." -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` prompt="EVM #"
setup-uboot-env-am43x.sh +1 -1
@@ -51,7 +51,7 @@ echo "-------------------------------------------------------------------------- echo "This step will set up the u-boot variables for booting the EVM." echo -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` # Configure prompt for U-Boot 2016.05
setup-uboot-env-am57xx-evm.sh +1 -1
@@ -51,7 +51,7 @@ echo "-------------------------------------------------------------------------- echo "This step will set up the u-boot variables for booting the EVM." echo "--------------------------------------------------------------------------------" -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` # Configure prompt for U-Boot 2016.05
setup-uboot-env-am65x.sh +1 -1
@@ -51,7 +51,7 @@ echo "-------------------------------------------------------------------------- echo "This step will set up the u-boot variables for booting the EVM." echo "--------------------------------------------------------------------------------" -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` # Configure prompt for U-Boot 2016.05
setup-uboot-env-beagleboard.sh +1 -1
@@ -37,7 +37,7 @@ echo echo "--------------------------------------------------------------------------------" echo "This step will set up the u-boot variables for booting the EVM." -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` prompt="OMAP3 beagleboard.org #"
setup-uboot-env-k2g-evm.sh +1 -1
@@ -78,7 +78,7 @@ echo "-------------------------------------------------------------------------- echo "This step will set up the u-boot variables for booting the EVM." echo "--------------------------------------------------------------------------------" -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` # Configure prompt for U-Boot 2016.05
setup-uboot-env-keystone.sh +1 -1
@@ -154,7 +154,7 @@ echo "-------------------------------------------------------------------------- echo "This step will set up the u-boot variables for booting the EVM." echo "--------------------------------------------------------------------------------" -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` # Configure prompt for U-Boot 2016.05
setup-uboot-env-omap5.sh +1 -1
@@ -37,7 +37,7 @@ echo echo "--------------------------------------------------------------------------------" echo "This step will set up the u-boot variables for booting the EVM." -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` prompt="$prompt"
Signature · 1 line
2.7.4
Jacob Stiffler
AppliedPushed to master.
Thank you,
Jake
Quoted 162 lines · Denys Dmytriyenko
Simple ifconfig has been deprecated for quite some time in favor of ip tools. New distros no longer package ifconfig, so use ip addr show command instead.
Signed-off-by Denys Dmytriyenko <[email protected]>Cc Andreas Dannenberg <[email protected]>--- setup-uboot-env-am18x.sh | 2 +- setup-uboot-env-am335x.sh | 2 +- setup-uboot-env-am3517.sh | 2 +- setup-uboot-env-am37x.sh | 2 +- setup-uboot-env-am43x.sh | 2 +- setup-uboot-env-am57xx-evm.sh | 2 +- setup-uboot-env-am65x.sh | 2 +- setup-uboot-env-beagleboard.sh | 2 +- setup-uboot-env-k2g-evm.sh | 2 +- setup-uboot-env-keystone.sh | 2 +- setup-uboot-env-omap5.sh | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-)setup-uboot-env-am18x.sh +1
-1@@ -42,7 +42,7 @@ SDKinstall=`grep TI_SDK_PATH= $cwd/../Rules.make | cut -d= -f2` dstdefault=$SDKinstall/targetNFS -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` prompt=" >"setup-uboot-env-am335x.sh +1
-1@@ -51,7 +51,7 @@ echo "-------------------------------------------------------------------------- echo "This step will set up the U-Boot variables for booting the EVM." echo -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` # Configure prompt for U-Boot 2016.05setup-uboot-env-am3517.sh +1
-1@@ -37,7 +37,7 @@ echo echo "--------------------------------------------------------------------------------" echo "This step will set up the u-boot variables for booting the EVM." -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` prompt="EVM #"setup-uboot-env-am37x.sh +1
-1@@ -37,7 +37,7 @@ echo echo "--------------------------------------------------------------------------------" echo "This step will set up the u-boot variables for booting the EVM." -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` prompt="EVM #"setup-uboot-env-am43x.sh +1
-1@@ -51,7 +51,7 @@ echo "-------------------------------------------------------------------------- echo "This step will set up the u-boot variables for booting the EVM." echo -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` # Configure prompt for U-Boot 2016.05setup-uboot-env-am57xx-evm.sh +1
-1@@ -51,7 +51,7 @@ echo "-------------------------------------------------------------------------- echo "This step will set up the u-boot variables for booting the EVM." echo "--------------------------------------------------------------------------------" -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` # Configure prompt for U-Boot 2016.05setup-uboot-env-am65x.sh +1
-1@@ -51,7 +51,7 @@ echo "-------------------------------------------------------------------------- echo "This step will set up the u-boot variables for booting the EVM." echo "--------------------------------------------------------------------------------" -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` # Configure prompt for U-Boot 2016.05setup-uboot-env-beagleboard.sh +1
-1@@ -37,7 +37,7 @@ echo echo "--------------------------------------------------------------------------------" echo "This step will set up the u-boot variables for booting the EVM." -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` prompt="OMAP3 beagleboard.org #"setup-uboot-env-k2g-evm.sh +1
-1@@ -78,7 +78,7 @@ echo "-------------------------------------------------------------------------- echo "This step will set up the u-boot variables for booting the EVM." echo "--------------------------------------------------------------------------------" -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` # Configure prompt for U-Boot 2016.05setup-uboot-env-keystone.sh +1
-1@@ -154,7 +154,7 @@ echo "-------------------------------------------------------------------------- echo "This step will set up the u-boot variables for booting the EVM." echo "--------------------------------------------------------------------------------" -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` # Configure prompt for U-Boot 2016.05setup-uboot-env-omap5.sh +1
-1@@ -37,7 +37,7 @@ echo echo "--------------------------------------------------------------------------------" echo "This step will set up the u-boot variables for booting the EVM." -ipdefault=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }'` +ipdefault=`ip addr show | grep 'inet ' | grep -v '127.0.0.1' | cut -d/ -f1 | awk '{ print $2 }'` platform=`grep PLATFORM= $cwd/../Rules.make | cut -d= -f2` prompt="$prompt"