Page 1 of 1

/etc/init.d/functions: line 157: shift: shift count out of r

PostPosted: Apr 10th, '21, 04:26
by MikeFinch
In Mageia 8, whilst trying to use LAMPP, I keep getting the following error message when I (apparently successfully : ok, ok, ok) boot lampp with './xampp start'.

Code: Select all
'/etc/init.d/functions: line 157: shift: shift count out of range'.

This occurs with versions 8.0.3-0 and 7.4.10-0.
The following lines (142 to 158) in functions are

142  'case "$1" in
143       *%s*%s*%s*%s*)
144               GPRINTF_MSG=$(gprintf "$1" "$2" "$3" "$4" "$5")
145              shift 5;;
146       *%s*%s*%s*)
147               GPRINTF_MSG=$(gprintf "$1" "$2" "$3" "$4")
148               shift 4;;
149       *%s*%s*)
150               GPRINTF_MSG=$(gprintf "$1" "$2" "$3")
151               shift 3;;
152       *%s*)
153               GPRINTF_MSG=$(gprintf "$1" "$2")
154               shift 2;;
155       *)
156               GPRINTF_MSG=$(gprintf "$1")
157               shift
158  esac'


I don't understand this (and the rest of!) the 'functions' script. Can anyone assist me please? An Internet search was fruitless.

Re: /etc/init.d/functions: line 157: shift: shift count out

PostPosted: Apr 10th, '21, 14:24
by doktor5000
Hi there, you can ignore this, it's only a cosmetic issue with the shell being too verbose. Have a look at https://bugs.mageia.org/show_bug.cgi?id=27112 for a workaround if you don't want to see that message.