Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96259 - sys-apps/baselayout-1.11.12-r4: /etc/init.d/halt.sh remounted rootfs / read-only twice
Summary: sys-apps/baselayout-1.11.12-r4: /etc/init.d/halt.sh remounted rootfs / read-o...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-16 01:54 UTC by Toralf Förster
Modified: 2005-06-16 17:06 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 Toralf Förster gentoo-dev 2005-06-16 01:54:34 UTC
Adding '-u' to sort removes doubled entries from a list:

n22 ~ # echo $(awk '$1 != "none" { print $2 }' /proc/mounts | sort -r)
/sys /proc/bus/usb /proc /dev/pts /dev / /
n22 ~ # echo $(awk '$1 != "none" { print $2 }' /proc/mounts | sort -ur)
/sys /proc/bus/usb /proc /dev/pts /dev /


Here is the diff:

n22 ~ # diff -u halt.sh /etc/init.d/halt.sh
--- halt.sh     2005-06-16 10:37:40.000000000 +0200
+++ /etc/init.d/halt.sh 2005-06-16 10:49:58.000000000 +0200
@@ -192,7 +192,7 @@
        # Get better results with a sync and sleep
        sync; sync
        sleep 1
-       for x in $(awk '$1 != "none" { print $2 }' /proc/mounts | sort -r) ; do
+       for x in $(awk '$1 != "none" { print $2 }' /proc/mounts | sort -ur) ; do
                x=${x//\\040/ }
                if [[ ${cmd} == "u" ]]; then
                        umount -r -r "${x}"


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 SpanKY gentoo-dev 2005-06-16 17:06:43 UTC
thanks ... i think the reason this didnt come up was no one expected it :)

now in cvs