Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520266 - mount-ro does not work as intended on /
Summary: mount-ro does not work as intended on /
Status: RESOLVED DUPLICATE of bug 489178
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal major
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-19 18:14 UTC by Joe M
Modified: 2014-08-20 18:53 UTC (History)
0 users

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


Attachments
updated rc-mount.sh (rc-mount.sh,1.76 KB, application/x-shellscript)
2014-08-20 04:39 UTC, Joe M
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joe M 2014-08-19 18:14:39 UTC
Hello,

I think there is a bug in /etc/init.d/mount-ro, it calls fuser from do_unmount with the command: "timeout -k 10 -sKILL 60 fuser -m /" -- This command returns all the kernel processes too.

Because of this, the case statement in rc-mount.sh is always matching on the current process and never goes to the other scenarios mentioned.

                        case " $pids " in
                                *" $$ "*)
                                        eend 1 "failed because we are using" \
                                        "$mnt"
                                        /bin/bash
                                        retry=0;;
                                " - ")
                                        eend 1 "returned -"
                                        retry=0;;
                                "  ")
                                        eend 1 "in use but fuser finds nothing"
                                        retry=0;;
                                *)
                                        if [ $retry -le 0 ]; then
                                                eend 1 "......failed to $cmd $mnt after 4 retries"
                                        else
                                                local sig="TERM"
                                                : $(( retry -= 1 ))
                                                [ $retry = 1 ] && sig="KILL"
                                                set -o verbose
                                                set -o xtrace
                                                fuser $f_kill$sig -k $f_opts \
                                                        "$mnt" >/dev/null 2>&1
                                                sleep 1
                                                set +o verbose
                                                set +o xtrace
                                        fi
                                        ;;
                        esac

Thanks
Joe

Reproducible: Always
Comment 1 Joe M 2014-08-20 04:39:05 UTC
Created attachment 383170 [details]
updated rc-mount.sh
Comment 2 Joe M 2014-08-20 18:53:51 UTC

*** This bug has been marked as a duplicate of bug 489178 ***