[meta-cgl] ucarp: don't hardcode the path for ifconfig

Submitted by mingli.yu@windriver.com on Aug. 7, 2020, 8:47 a.m. | Patch ID: 175103

Details

Message ID 20200807084715.3024520-1-mingli.yu@windriver.com
State New
Headers show

Commit Message

mingli.yu@windriver.com Aug. 7, 2020, 8:47 a.m.
From: Mingli Yu <mingli.yu@windriver.com>

Don't hardcode the path for the ifconfig command in case the path
for ifconfig on the system may be different from the hardcoded.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-down.sh | 2 +-
 meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-up.sh   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-down.sh b/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-down.sh
index a431c32..27e0d2b 100644
--- a/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-down.sh
+++ b/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-down.sh
@@ -4,4 +4,4 @@  exec 2> /dev/null
 #/sbin/ip addr del "$2"/24 dev "$1"
 
 # or alternatively:
-/sbin/ifconfig "$1":254 down
+ifconfig "$1":254 down
diff --git a/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-up.sh b/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-up.sh
index c1b8a4f..f81d578 100644
--- a/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-up.sh
+++ b/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-up.sh
@@ -4,4 +4,4 @@  exec 2> /dev/null
 #/sbin/ip addr add "$2"/24 dev "$1"
 
 # or alternatively:
-/sbin/ifconfig "$1":254 "$2" netmask 255.255.255.0 
+ifconfig "$1":254 "$2" netmask 255.255.255.0

Comments

Jeremy Puhlman Aug. 9, 2020, 3:51 a.m.
Merged.

On 8/7/2020 1:47 AM, Yu, Mingli wrote:
> From: Mingli Yu <mingli.yu@windriver.com>
>
> Don't hardcode the path for the ifconfig command in case the path
> for ifconfig on the system may be different from the hardcoded.
>
> Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> ---
>   meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-down.sh | 2 +-
>   meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-up.sh   | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-down.sh b/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-down.sh
> index a431c32..27e0d2b 100644
> --- a/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-down.sh
> +++ b/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-down.sh
> @@ -4,4 +4,4 @@ exec 2> /dev/null
>   #/sbin/ip addr del "$2"/24 dev "$1"
>   
>   # or alternatively:
> -/sbin/ifconfig "$1":254 down
> +ifconfig "$1":254 down
> diff --git a/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-up.sh b/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-up.sh
> index c1b8a4f..f81d578 100644
> --- a/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-up.sh
> +++ b/meta-cgl-common/recipes-cgl/ucarp/ucarp/vip-up.sh
> @@ -4,4 +4,4 @@ exec 2> /dev/null
>   #/sbin/ip addr add "$2"/24 dev "$1"
>   
>   # or alternatively:
> -/sbin/ifconfig "$1":254 "$2" netmask 255.255.255.0
> +ifconfig "$1":254 "$2" netmask 255.255.255.0
>
>