From 016d4810413cd9c1251c07fda223276b24794741 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20P=C3=A9rennou=20=28Viveris=20Technologie=29?= Date: Mon, 16 Jun 2014 11:35:18 +0200 Subject: [PATCH] Bashisms hunt --- install/bios/+init.sh | 0 install/bios/update_bios_cfg.sh | 5 +++-- install/ipmi/update_blade_cfg.sh | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) mode change 100644 => 100755 install/bios/+init.sh diff --git a/install/bios/+init.sh b/install/bios/+init.sh old mode 100644 new mode 100755 diff --git a/install/bios/update_bios_cfg.sh b/install/bios/update_bios_cfg.sh index 8bd3516..e960e6f 100755 --- a/install/bios/update_bios_cfg.sh +++ b/install/bios/update_bios_cfg.sh @@ -9,7 +9,7 @@ mydir=$(cd $mydir; pwd) # formating functions -_echo () { [ "$(echo -e '')" ] && echo $@ || echo -e $@; } +_echo () { printf "$@\n"; } title () { _echo "\033[0;1m$*\033[0;0m"; } pass () { _echo "\033[1;32m$*\033[0;0m"; } warn () { _echo "\033[1;33m$*\033[0;0m"; } @@ -48,7 +48,8 @@ done fail "Real mode, things will really append" || \ warn "Dummy mode, nothing will be done" if [ ! "$ANS" = "yes" ]; then - read -p "Press 'y' to continue: " ANS + printf "Press 'y' to continue: " + read ANS [ "$ANS" = "y" ] || exit 1 fi diff --git a/install/ipmi/update_blade_cfg.sh b/install/ipmi/update_blade_cfg.sh index 413a9ca..59389e7 100755 --- a/install/ipmi/update_blade_cfg.sh +++ b/install/ipmi/update_blade_cfg.sh @@ -9,7 +9,7 @@ mydir=$(cd $mydir; pwd) # formating functions -_echo () { [ "$(echo -e '')" ] && echo $@ || echo -e $@; } +_echo () { printf "$@\n"; } title () { _echo "\033[0;1m$*\033[0;0m"; } pass () { _echo "\033[1;32m$*\033[0;0m"; } warn () { _echo "\033[1;33m$*\033[0;0m"; } @@ -48,7 +48,8 @@ done fail "Real mode, things will really append" || \ warn "Dummy mode, nothing will be done" if [ ! "$ANS" = "yes" ]; then - read -p "Press 'y' to continue: " ANS + printf "Press 'y' to continue: " + read ANS [ "$ANS" = "y" ] || exit 1 fi -- 2.30.2