Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 230 - makewhatis expects /usr to be rw
Summary: makewhatis expects /usr to be rw
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: man
Version: 5.2
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1998-11-30 10:00 UTC by Marc MERLIN
Modified: 2014-03-19 11:09 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1998-12-04 22:10:03 UTC


Attachments (Terms of Use)

Description Marc MERLIN 1998-11-30 10:00:14 UTC
Resending old report to bugzilla.

This "bug" doesn't show on a stock installation.

The problem is that makewhatis is non FHS compliant (since
one is supposed to be able to mount /usr as read
only)

If you replace the makewhatis cron job with the following
script, it should catch the most common setups (it won't
work though if for instance /usr/local/man is a mount point)

#!/bin/bash
#
# By marcsoft@merlins.org
(07/27/98)

USR=no
USRLOCAL=no
if [ ! -z "`cat /proc/mounts  | grep '/usr ' | grep ro`" ];
then

USR=yes
        mount -o remount,rw
/usr
fi
if [ ! -z "`cat /proc/mounts  | grep '/usr/local ' | grep
ro`" ]; then

USRLOCAL=yes
        mount -o remount,rw
/usr/local
fi

makewhatis
-w

if [ $USR = "yes" ];
then
        mount -o remount,ro
/usr
fi
if [ $USRLOCAL = "yes" ];
then
        mount -o remount,ro
/usr/local
fi

Comment 1 David Lawrence 1998-12-04 22:10:59 UTC
This would be nice ideally but it unfortunately cannot happen
realistically. A multiuser machine requires /usr to be accessible most
of the time. When root wants to upgrade something, they would need to
unmount the partition and then remount rw in order to upgrade and then
back again. This would cause interruption. Most of the /usr tree is
already non writable by users other than root regardless.

Comment 2 Marc MERLIN 1998-12-04 22:20:59 UTC
You don't need to umount /usr to remount as read write, there is no
interruption involved.

I use:
magic:~$ more /var/local/scr/rw
#!/bin/sh

echo Remounting /usr read-write
if [ ! -z "`cat /proc/mounts  | grep '/usr '`" ]; then
        mount -o remount,rw /usr
fi
if [ ! -z "`cat /proc/mounts  | grep '/usr/local '`" ]; then
        mount -o remount,rw /usr/local
fi

/usr has been read only on my systems for over two years with no
problems whatsoever (except the occasional script that I need to fix).
The main reason for having /usr ro is to prevent long fscks and
possible filesystem corruption when a crash/power outage does occur.

Note that it is still fine with me if you discard this though :-)


Note You need to log in before you can comment on or make changes to this bug.