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

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

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

Postby MikeFinch » Apr 10th, '21, 04:26

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.
Last edited by isadora on Apr 10th, '21, 09:55, edited 1 time in total.
Reason: Please place command-output between [CODE]-tags, to improve readability, thanks ahead!!! ;)
Posts: 61
Joined: Apr 12th, '12, 07:20

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

Postby doktor5000 » Apr 10th, '21, 14:24

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.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
Posts: 16798
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest