diff --git a/doinst.sh b/doinst.sh index 0cdaa6a..cf708cb 100644 --- a/doinst.sh +++ b/doinst.sh @@ -15,3 +15,13 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } +rmconfig() { + CFG="$1" + ORIGMD5="$2" + if [ -r $CFG ] && [ "`cat $CFG | md5sum`" = "$ORIGMD5 -" ]; then + mv $CFG $CFG.orig + fi +} + +rmconfig etc/asound.conf 94423887ed53ea0c17db9f9aeb2a40a6 + diff --git a/etc/rc.d/rc.alsa b/etc/rc.d/rc.alsa new file mode 100644 index 0000000..207364a --- /dev/null +++ b/etc/rc.d/rc.alsa @@ -0,0 +1,88 @@ +#!/bin/sh +# Load the mixer settings and OSS compatibility (if enabled) for ALSA. +# (the Advanced Linux Sound Architecture) + +# A function to load the ALSA mixer settings: +load_alsa_mixer() { + if [ -r /var/lib/alsa/asound.state ]; then + echo "Loading ALSA mixer settings: /usr/sbin/alsactl restore" + /usr/sbin/alsactl restore + else + # It's possible a user might not want to set a default sound state. + # In that case, do this: touch /var/lib/alsa/no.asound.state + if [ ! -r /var/lib/alsa/no.asound.state ]; then + echo "Setting default ALSA mixer settings." + # set default mixer volumes for ALSA + # Taken from the alsaconf script. + amixer -s -q < $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION +cat $CWD/readme.txt > $PKG/usr/doc/$PKGNAM-$VERSION/readme.txt + find $CWD/etc -type f ! -name '*.orig' -printf '%P\n' | while read config; do echo Installing /etc/$config install -Dm644 $CWD/etc/$config $PKG/etc/$config.new @@ -27,8 +30,7 @@ find $CWD/etc -type f ! -name '*.orig' -printf '%P\n' | while read config; do done # Set some special permissions -chmod 755 $PKG/etc/rc.d/rc.M.new -chmod 755 $PKG/etc/rc.d/rc.dhcpcd +chmod 755 $PKG/etc/rc.d/rc.* cd $PKG /sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz diff --git a/slack-desc b/slack-desc index 48d7be9..68f7f4b 100644 --- a/slack-desc +++ b/slack-desc @@ -16,4 +16,4 @@ rocket-config: and the original will be saved with the .orig extension. rocket-config: Consider removing the .orig files, or restore them when removing rocket-config: this package. rocket-config: -rocket-config: +rocket-config: See /usr/doc for more info.