All of lore.kernel.org
 help / color / mirror / Atom feed
* [tisdk-setup-scripts][PATCH] setup-uboot-env-*: replace ifconfig with ip addr show
@ 2019-12-10 19:04 Denys Dmytriyenko
  2019-12-11 18:05 ` [EXTERNAL] " Jacob Stiffler
  0 siblings, 1 reply; 2+ messages in thread
From: Denys Dmytriyenko @ 2019-12-10 19:04 UTC (permalink / raw)
  To: meta-arago; +Cc: Andreas Dannenberg

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 <denys@ti.com>
Cc: Andreas Dannenberg <dannenberg@ti.com>
---
 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(-)

diff --git a/setup-uboot-env-am18x.sh b/setup-uboot-env-am18x.sh
index 8c296e5..3733281 100644
--- a/setup-uboot-env-am18x.sh
+++ b/setup-uboot-env-am18x.sh
@@ -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=" >"
 
diff --git a/setup-uboot-env-am335x.sh b/setup-uboot-env-am335x.sh
index 80b0a52..f129875 100644
--- a/setup-uboot-env-am335x.sh
+++ b/setup-uboot-env-am335x.sh
@@ -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
diff --git a/setup-uboot-env-am3517.sh b/setup-uboot-env-am3517.sh
index 73e9971..49dda0a 100644
--- a/setup-uboot-env-am3517.sh
+++ b/setup-uboot-env-am3517.sh
@@ -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 #"
 
diff --git a/setup-uboot-env-am37x.sh b/setup-uboot-env-am37x.sh
index e9970d6..eab332b 100644
--- a/setup-uboot-env-am37x.sh
+++ b/setup-uboot-env-am37x.sh
@@ -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 #"
 
diff --git a/setup-uboot-env-am43x.sh b/setup-uboot-env-am43x.sh
index f7f2d95..24bc58a 100644
--- a/setup-uboot-env-am43x.sh
+++ b/setup-uboot-env-am43x.sh
@@ -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
diff --git a/setup-uboot-env-am57xx-evm.sh b/setup-uboot-env-am57xx-evm.sh
index 574c111..323c134 100644
--- a/setup-uboot-env-am57xx-evm.sh
+++ b/setup-uboot-env-am57xx-evm.sh
@@ -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
diff --git a/setup-uboot-env-am65x.sh b/setup-uboot-env-am65x.sh
index 6335ce4..e17f700 100644
--- a/setup-uboot-env-am65x.sh
+++ b/setup-uboot-env-am65x.sh
@@ -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
diff --git a/setup-uboot-env-beagleboard.sh b/setup-uboot-env-beagleboard.sh
index bc237ae..60ca7d6 100644
--- a/setup-uboot-env-beagleboard.sh
+++ b/setup-uboot-env-beagleboard.sh
@@ -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 #"
 
diff --git a/setup-uboot-env-k2g-evm.sh b/setup-uboot-env-k2g-evm.sh
index 4944f99..5845f2d 100755
--- a/setup-uboot-env-k2g-evm.sh
+++ b/setup-uboot-env-k2g-evm.sh
@@ -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
diff --git a/setup-uboot-env-keystone.sh b/setup-uboot-env-keystone.sh
index 37fb2c1..3a443dd 100755
--- a/setup-uboot-env-keystone.sh
+++ b/setup-uboot-env-keystone.sh
@@ -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
diff --git a/setup-uboot-env-omap5.sh b/setup-uboot-env-omap5.sh
index 7b6f084..7fba3ef 100644
--- a/setup-uboot-env-omap5.sh
+++ b/setup-uboot-env-omap5.sh
@@ -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"
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [EXTERNAL] [tisdk-setup-scripts][PATCH] setup-uboot-env-*: replace ifconfig with ip addr show
  2019-12-10 19:04 [tisdk-setup-scripts][PATCH] setup-uboot-env-*: replace ifconfig with ip addr show Denys Dmytriyenko
@ 2019-12-11 18:05 ` Jacob Stiffler
  0 siblings, 0 replies; 2+ messages in thread
From: Jacob Stiffler @ 2019-12-11 18:05 UTC (permalink / raw)
  To: Denys Dmytriyenko, meta-arago; +Cc: Andreas Dannenberg

Pushed to master.


Thank you,

Jake

On 12/10/2019 2:04 PM, Denys Dmytriyenko wrote:
> 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 <denys@ti.com>
> Cc: Andreas Dannenberg <dannenberg@ti.com>
> ---
>   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(-)
>
> diff --git a/setup-uboot-env-am18x.sh b/setup-uboot-env-am18x.sh
> index 8c296e5..3733281 100644
> --- a/setup-uboot-env-am18x.sh
> +++ b/setup-uboot-env-am18x.sh
> @@ -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=" >"
>   
> diff --git a/setup-uboot-env-am335x.sh b/setup-uboot-env-am335x.sh
> index 80b0a52..f129875 100644
> --- a/setup-uboot-env-am335x.sh
> +++ b/setup-uboot-env-am335x.sh
> @@ -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
> diff --git a/setup-uboot-env-am3517.sh b/setup-uboot-env-am3517.sh
> index 73e9971..49dda0a 100644
> --- a/setup-uboot-env-am3517.sh
> +++ b/setup-uboot-env-am3517.sh
> @@ -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 #"
>   
> diff --git a/setup-uboot-env-am37x.sh b/setup-uboot-env-am37x.sh
> index e9970d6..eab332b 100644
> --- a/setup-uboot-env-am37x.sh
> +++ b/setup-uboot-env-am37x.sh
> @@ -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 #"
>   
> diff --git a/setup-uboot-env-am43x.sh b/setup-uboot-env-am43x.sh
> index f7f2d95..24bc58a 100644
> --- a/setup-uboot-env-am43x.sh
> +++ b/setup-uboot-env-am43x.sh
> @@ -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
> diff --git a/setup-uboot-env-am57xx-evm.sh b/setup-uboot-env-am57xx-evm.sh
> index 574c111..323c134 100644
> --- a/setup-uboot-env-am57xx-evm.sh
> +++ b/setup-uboot-env-am57xx-evm.sh
> @@ -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
> diff --git a/setup-uboot-env-am65x.sh b/setup-uboot-env-am65x.sh
> index 6335ce4..e17f700 100644
> --- a/setup-uboot-env-am65x.sh
> +++ b/setup-uboot-env-am65x.sh
> @@ -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
> diff --git a/setup-uboot-env-beagleboard.sh b/setup-uboot-env-beagleboard.sh
> index bc237ae..60ca7d6 100644
> --- a/setup-uboot-env-beagleboard.sh
> +++ b/setup-uboot-env-beagleboard.sh
> @@ -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 #"
>   
> diff --git a/setup-uboot-env-k2g-evm.sh b/setup-uboot-env-k2g-evm.sh
> index 4944f99..5845f2d 100755
> --- a/setup-uboot-env-k2g-evm.sh
> +++ b/setup-uboot-env-k2g-evm.sh
> @@ -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
> diff --git a/setup-uboot-env-keystone.sh b/setup-uboot-env-keystone.sh
> index 37fb2c1..3a443dd 100755
> --- a/setup-uboot-env-keystone.sh
> +++ b/setup-uboot-env-keystone.sh
> @@ -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
> diff --git a/setup-uboot-env-omap5.sh b/setup-uboot-env-omap5.sh
> index 7b6f084..7fba3ef 100644
> --- a/setup-uboot-env-omap5.sh
> +++ b/setup-uboot-env-omap5.sh
> @@ -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"
>   


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-11 18:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 19:04 [tisdk-setup-scripts][PATCH] setup-uboot-env-*: replace ifconfig with ip addr show Denys Dmytriyenko
2019-12-11 18:05 ` [EXTERNAL] " Jacob Stiffler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.