#!/bin/sh # # /usr/local/sbin/aptdpkgro # Put together and tweaked by Jonas Smedegaard # 2001-2002 # # $Id: aptdpkgro,v 1.1 2002-03-07 16:22:51 jonas Exp $ # # Auto re-mounting of a readonly /usr # Put the following in a file below /etc/apt/apt.conf.d: # # // Auto re-mounting of a readonly /usr # // Based on mail from Anthony Towns # // http://lists.debian.org/debian-devel/2001/debian-devel-200111/msg00212.html # # // This is the intended thing: # // DPkg { # // Pre-Invoke {"mount -o remount,rw /usr";}; # // Post-Invoke {"mount -o remount,ro /usr";}; # // }; # # DPkg { # Pre-Install-Pkgs {"/usr/local/sbin/aptdpkgro";}; # Pre-Invoke {"mount -o remount,rw /usr";}; # Post-Invoke {"/usr/local/sbin/aptdpkgclean; mount -o remount,ro /usr";}; # }; # pathmatch="^/usr" while read debname; do pkg=$(dpkg --info $debname | sed -n 's/^ Package: *//p' | head -1) (dpkg -L "$pkg" 2>/dev/null || true) | grep "$pathmatch" | while read file; do [ -f "$file" -a ! -L "$file" ] || continue dir=`dirname "$file"`; base=`basename "$file"`; inode=`find "$file" -printf "%i\n"` [ -L "$dir/.${base}.dpkg-ro-used.$inode" ] || continue (cd "$dir" && ln "$base" ".${base}.dpkg-ro-used.$inode") echo "$dir/.${base}.dpkg-ro-used.$inode" done >>/var/lib/my_ro_hack.todel done h/refs/?h=master'>refslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2023-06-27 09:35:08 +0200
committerJonas Smedegaard <dr@jones.dk>2023-06-27 09:35:08 +0200
commitfd54908da2b05c526dd3bee9b6dcd093214a220d (patch)
treec69c845069c99d1d01044f6fafda7c08433329c6 /tags/96/b6/87io4vsfii.fsf@rudra.copyninja.info/inbox
parentba46132213560cf3335d53560d519c0ec0190da2 (diff)
Diffstat (limited to 'tags/96/b6/87io4vsfii.fsf@rudra.copyninja.info/inbox')
-rw-r--r--tags/96/b6/87io4vsfii.fsf@rudra.copyninja.info/inbox0
1 files changed, 0 insertions, 0 deletions