diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-09-21 16:13:54 -0700 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-09-21 16:13:54 -0700 |
commit | 65f4102d48726afa4324d789551e7a74c806a590 (patch) | |
tree | ea36add62783a53c1d5ffaed3fd8e33434e242c6 | |
parent | 58fc27aaeb6d7d67cdf93997a33e0cbe4b5d7ada (diff) | |
download | initscripts-65f4102d48726afa4324d789551e7a74c806a590.tar.xz |
Replace \e with \033 for printfs
\e isn't recongized in all shells. This causes issues with the locale.sh
script. For completeness, \e is replaced throughout the rc.sysinit script
Original-idea-by: David Khunne <stahlheinzkockhausen@googlemail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-x | rc.sysinit | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -361,10 +361,10 @@ if echo "$LOCALE" | /bin/grep -qi utf ; then # but also when user has set vt.default_utf8=0 but LOCALE is *.UTF-8. for i in /dev/tty[0-9]*; do /usr/bin/kbd_mode -u < ${i} - printf "\e%%G" > ${i} + printf "\033%%G" > ${i} done # the $CONSOLE check helps us avoid this when running scripts from cron - echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e%%G"; fi' >>/etc/profile.d/locale.sh + echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\033%%G"; fi' >>/etc/profile.d/locale.sh stat_done [ -n "$KEYMAP" ] && status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q -u $KEYMAP else @@ -372,10 +372,10 @@ else # make non-UTF-8 consoles work on 2.6.24 and newer kernels for i in /dev/tty[0-9]*; do /usr/bin/kbd_mode -a < ${i} - printf "\e%%@" > ${i} + printf "\033%%@" > ${i} done # the $CONSOLE check helps us avoid this when running scripts from cron - echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e%%@"; fi' >>/etc/profile.d/locale.sh + echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\033%%@"; fi' >>/etc/profile.d/locale.sh stat_done [ -n "$KEYMAP" ] && status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q $KEYMAP fi @@ -397,10 +397,10 @@ if [ -n "$CONSOLEFONT" ]; then stat_fail else for i in /dev/tty[0-9]*; do - printf "\e(K" > ${i} + printf "\033(K" > ${i} done # the $CONSOLE check helps us avoid this when running scripts from cron - echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e(K"; fi' >>/etc/profile.d/locale.sh + echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\033(K"; fi' >>/etc/profile.d/locale.sh stat_done fi fi |