Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258836 - sys-apps/openrc-0.4.3: minor bug in numlock init.d script
Summary: sys-apps/openrc-0.4.3: minor bug in numlock init.d script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard: in upstream trunk (next release)
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-13 12:02 UTC by Dimitrios Christidis
Modified: 2009-10-11 09:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed fix (numlock.patch,295 bytes, patch)
2009-02-13 12:03 UTC, Dimitrios Christidis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitrios Christidis 2009-02-13 12:02:31 UTC
In /etc/init.d/numlock, line 7:
ttyn=${rc_tty_number:-${RC_TTY_NUMBER}:-12}

The substituion is wrong if $rc_tty_number is not set in /etc/rc.conf.

Reproducible: Always

Steps to Reproduce:
1.Comment $rc_tty_number assignment in /etc/rc.conf
2.Restart numlock service
Actual Results:  
":-12" is assigned to $ttyn

Error Ouput:
/etc/init.d/numlock: line 22: [: :-12: integer expression expected

(OpenRC reports that the service started succefully)
Comment 1 Dimitrios Christidis 2009-02-13 12:03:32 UTC
Created attachment 181859 [details, diff]
Proposed fix
Comment 2 Matthias Schwarzott gentoo-dev 2009-02-13 12:16:54 UTC
This bug is there since at least openrc-0.4.0. So I guess it is not necessary to fix it with a new ebuild revision.
Comment 3 Roy Marples 2009-02-13 12:26:10 UTC
Fixed upstream, thanks
http://roy.marples.name/projects/openrc/changeset/1500
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-04-17 03:41:27 UTC
minor enough to wait for next release.