Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 1639 - at system halt: /sbin/rc: return: can only `return' from a function or sourced script
Summary: at system halt: /sbin/rc: return: can only `return' from a function or source...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: Lowest enhancement (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-10 00:50 UTC by Sandy McArthur
Modified: 2003-02-04 19:42 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sandy McArthur 2002-04-10 00:50:27 UTC
When I halt my box the last line, which is after "Power down" is:

/sbin/rc: return: can only `return' from a function or sourced script

Here's the package /sbin/rc is from:
# qpkg -f /sbin/rc
sys-apps/baselayout-1.7.7 *

If you view the source to /sbin/rc and search for 'return' just before the 2nd
match you'll find: "#should never get here". Well, I'd say it does.

As far as I can tell this isn't critical to anything but I figure cosmetic bugs
are worth reporting too.
Comment 1 Steve Flack 2002-04-11 04:57:43 UTC
I get this too... If I didn't have an off/on on my power supply it would be a 
PITA as it doesn't power down the machine
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2002-04-13 00:50:12 UTC
Already fixed after report on irc.  Changing the return to "exit 0" should
do the trick.
Comment 3 Autobahn Autobooom 2002-04-16 10:06:20 UTC
same problem here. And i changed return to "exit 0" and the machine still does 
not power down. At least the message "/sbin/rc: return: can only `return' from 
a function or sourced script" desapeared.
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2002-04-16 15:52:38 UTC
If it do not power down, it means:

1) You did not compile some sort of power management into your kernel.

2) You should try ACPI if you have APM, or vice versa

3) There could be a bios problem with the current PM implementations in
   the kernel.

4) Something else, as I am not an expert on PM and shutdown issues.
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2002-04-25 15:46:43 UTC
The "at system halt: /sbin/rc: return: can only `return' from a function or
sourced script" issue is fixed.