Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 24428

Summary: localmount from baselayout-1.8.6.8-r1 does not evaluate the return code from swapon
Product: Gentoo Linux Reporter: Nils Ohlmeier <develop>
Component: [OLD] Core systemAssignee: Martin Schlemmer (RETIRED) <azarah>
Status: RESOLVED WONTFIX    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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.