| Summary: | /etc/init.d/functions: line 157: shift: number of "shift" out of range | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Aurelien Oudelet <ouaurelien> |
| Component: | RPM Packages | Assignee: | Base system maintainers <basesystem> |
| Status: | RESOLVED OLD | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | davidwhodgins, dvgevers, mageia, unruh |
| Version: | Cauldron | ||
| Target Milestone: | Mageia 8 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | initscripts-9.78-27.mga8.src.rpm | CVE: | |
| Status comment: | |||
|
Description
Aurelien Oudelet
2020-08-14 16:56:04 CEST
As discussed on the dev ml ... As it's only affecting init.d scripts, I confirmed adding the line shopt -u shift_verbose near the top of /etc/rc.d/init.d/functions fixes the problem. CC:
(none) =>
davidwhodgins
Aurelien Oudelet
2020-09-19 20:25:07 CEST
Severity:
minor =>
normal
Dick Gevers
2021-07-23 10:58:34 CEST
CC:
(none) =>
dvgevers Or removing that last shift 1 in line 157 seems to also solve it. I assume that is because if there is only one argument then shifting that one argument gives nonsense. CC:
(none) =>
unruh shopt -u simply seems to throw away the error notice, instead of fixing the problem. Oops. Mga 9 fixes this with
*)
GPRINTF_MSG=$(gprintf "$1")
# function may be called without any arguments, e.g. for 'success'
[ $# -ne 0 ] && shift
;;
although it was not fixed in Mga8.
So this should presumably be reverted to FIXED
While it's fixed in m9, it will not be fixed in m8. Resolution:
(none) =>
OLD |