POSTIN
/bin/sh
/usr/sbin/useradd -c "virtual console memory owner" -u 69 \
-s /sbin/nologin -r -d /dev vcsa 2> /dev/null || :
#- when devfs or udev are used, upgrade and install can be done easily :)
if [[ -e /dev/.devfsd ]] || [[ -e /dev/.udev.tdb ]] || [[ -d /dev/.udevdb/ ]]; then
[[ -d /lib/root-mirror ]] || mkdir /lib/root-mirror
mount --bind / /lib/root-mirror
DEV_DIR=/lib/root-mirror/dev
[[ -L $DEV_DIR/snd ]] && rm -f $DEV_DIR/snd
mkdir -p $DEV_DIR/{pts,shm}
/sbin/makedev $DEV_DIR
# race
while [[ ! -c $DEV_DIR/null ]]; do
rm -f $DEV_DIR/null
mknod -m 0666 $DEV_DIR/null c 1 3
chown root.root $DEV_DIR/null
done
umount -f /lib/root-mirror 2> /dev/null
#- case when makedev is being installed, not upgraded
else
DEV_DIR=/dev
mkdir -p $DEV_DIR/{pts,shm}
[[ -L $DEV_DIR/snd ]] && rm -f $DEV_DIR/snd
/sbin/makedev $DEV_DIR
# race
while [[ ! -c $DEV_DIR/null ]]; do
rm -f $DEV_DIR/null
mknod -m 0666 $DEV_DIR/null c 1 3
chown root.root $DEV_DIR/null
done
[[ -x /sbin/pam_console_apply ]] && /sbin/pam_console_apply
fi
:
Triggers
dev
/bin/sh
if [ ! -e /dev/.devfsd -a ! -e /dev/.udev.tdb -a ! -d /dev/.udevdb/ ]; then
#- when upgrading from old dev pkg to makedev pkg, this can't be done in %post
#- doing the same when upgrading from new dev pkg
DEV_DIR=/dev
mkdir -p $DEV_DIR/{pts,shm}
[[ -L $DEV_DIR/snd ]] && rm -f $DEV_DIR/snd
/sbin/makedev $DEV_DIR
# race
while [[ ! -c $DEV_DIR/null ]]; do
rm -f $DEV_DIR/null
mknod -m 0666 $DEV_DIR/null c 1 3
chown root.root $DEV_DIR/null
done
[[ -x /sbin/pam_console_apply ]] && /sbin/pam_console_apply
fi
: