[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

help wanted



Dear Sir,

	Here is what I do on my old machine where /usr, /usr/local are 
mounted read-only.

In root's .bashrc I have the following functions defined.

------------
function mrw
{
mount -o remount,rw $@
}

function mro
{
mount -o remount,ro $@
}
------------

	So all i do is this:

# mrw /usr
# apt-get update; apt-get upgrade
# mro /usr

It works fine.  The remount argument is the key.

prabhu


>>>>> "DPS" == P Sriram <sriram@xxxxxxxxxxxxxxxxxx> writes:

    DPS> friends, i thought it is a good idea to mount /usr read-only
    DPS> so as the enhance system security. i have accordinly put /usr
    DPS> on a separate partition on my linux box (rhl 7.0). now,
    DPS> however, i am at a loss as to how to install software that
    DPS> will put stuff in /usr. i have come up with a kludge by which
    DPS> a script edits my /etc/fstab so that /usr is shown an mouting
    DPS> as rw and another script changes /etc/fstab back to /usr
    DPS> mouting as ro. i run the first script, reboot the machine (so
    DPS> now /usr is available rw), install the software, run my
    DPS> second script and reboot the machine to go back to my usual
    DPS> setup. this is sort of feeling like windows. surely, there
    DPS> must be a better way to do this. any suggestions?

    DPS> sriram
---
Visit our home page at: www.chennailug.org
Send e-mail to 'ilugc-request@xxxxxxxxxxxxxxxxxx' with 'unsubscribe' 
in either the subject or the body to unsubscribe from this list.