RE: Setting apt to mount partitions read|read-only

2002-02-13 Thread Jeff Bonner

In the interest of brevity, thanks to everyone who replied on this
thread!

Jeff Bonner



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Setting apt to mount partitions read|read-only

2002-02-13 Thread Jeff Bonner
The Securing Debian HOWTO makes mention of the possibility that you can
set a partition as read-only, to further protect the various things in
/usr/bin for example.  Then when you apt-get upgrade, you can configure
apt to automagically turn off the read-only while needed, then turn it
back on (facilitating the install of new items).

However, I don't immediately see anything in 'man apt.conf' that tells
how to do it, assuming that's where you control this behavior from.
Does anyone have instructions on how to accomplish this?

Thanks in advance,

Jeff Bonner
Royal Oak MI USA

 PGP Key ID = 0x25ED7C88
Fingerprint = 1E3F 468D 8AA2 37A9 DEA4  4343 7866 55E9 25ED 7C88




Re: Setting apt to mount partitions read|read-only

2002-02-13 Thread Olaf Meeuwissen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeff Bonner [EMAIL PROTECTED] writes:

 The Securing Debian HOWTO makes mention of the possibility that you can
 set a partition as read-only, to further protect the various things in
 /usr/bin for example.  Then when you apt-get upgrade, you can configure
 apt to automagically turn off the read-only while needed, then turn it
 back on (facilitating the install of new items).
 
 However, I don't immediately see anything in 'man apt.conf' that tells
 how to do it, assuming that's where you control this behavior from.
 Does anyone have instructions on how to accomplish this?

I'm doing exactly this for a read-only mounted /usr partition with the
following in /etc/apt/apt.conf:

  DPkg
  {
  Pre-Invoke  { mount /usr -o remount,rw };
  Post-Invoke { mount /usr -o remount,ro };
  };

Note that the Post-Invoke may fail with a /usr busy error message.
This happens mainly when you are using files during the update that
got updated.  Annoying but not really a big deal.  Just make sure
these are no longer used and run the Post-Invoke manually.

Hope this helps,
- -- 
Olaf MeeuwissenEpson Kowa Corporation, CID
GnuPG key: 6BE37D90/AB6B 0D1F 99E7 1BF5 EB97  976A 16C7 F27D 6BE3 7D90
LPIC-2   -- I hack, therefore I am -- BOFH
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 http://mailcrypt.sourceforge.net/

iD8DBQE8av6+FsfyfWvjfZARAs/ZAJ0ZZ/hym5EN6M4CGXQtuTff/SWSKgCdFHd+
VF3mZMhU96oA+jE1e9OjWSA=
=6tGy
-END PGP SIGNATURE-



RE: Setting apt to mount partitions read|read-only

2002-02-13 Thread Jeff Bonner
In the interest of brevity, thanks to everyone who replied on this
thread!

Jeff Bonner