Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24428 - localmount from baselayout-1.8.6.8-r1 does not evaluate the return code from swapon
Summary: localmount from baselayout-1.8.6.8-r1 does not evaluate the return code from ...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-13 17:37 UTC by Nils Ohlmeier
Modified: 2003-07-16 10:15 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 Nils Ohlmeier 2003-07-13 17:37:49 UTC
The localmount init script from baselayout-1.8.6.8-r1 prints [ ok ] as result,
even if 'swapon -a' failed. The working partitions are mounted, but IMHO one
failure during swapon should result in an error message, to give a hint to the
user/admin.

Reproducible: Always
Steps to Reproduce:
1. try /etc/init.d/localmount start with a non-existing partition
2. 
3. 

Actual Results:  
Prints [ ok ]

Expected Results:  
Print [ !! ] if an swapon returned not zero.

Replace the 'eend 0' at the end of localmount with an evaluation of the return
code of swapon. Or at least remove the '>/dev/null' from the swapon command.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-07-16 10:15:10 UTC
This is what I get running swapon twice:

-------------------------------------
nosferatu .libs # swapoff -a
nosferatu .libs # swapon -a && echo yes
yes
nosferatu .libs # swapon -a && echo yes
swapon: /dev/hde2: Device or resource busy
nosferatu .libs # 
-------------------------------------

Meaning, its always going to fail in localmount, as /sbin/rc already
mounts available swap, and the one in localmount is just a 'backup' if
you have swap on lvm/raid/whatever.

Same with the '> /dev/null' thing ... its always going to show the
error in localmount.

Non issue if you ask me - the only swapon that we might consider checking
is the one in /sbin/rc.