--- /var/lib/dpkg/info/alsa-utils.postinst.orig 2010-10-21 18:39:46.000000000 +0200 +++ /var/lib/dpkg/info/alsa-utils.postinst 2010-10-22 07:12:06.709730362 +0200 @@ -9,14 +9,17 @@ if [ -f "$S" ] then mv "$S" "$S.conf" fi - if dpkg --compare-versions "$2" le "1.0.23-2ubuntu3.3"; then - # we need to call alsactl init once to activate the cards - # on later boots the state file handles this - id=`cat /proc/asound/card$1/id 2>/dev/null` - if [ "$id" = "Panda" -o "$id" = "SDP4430" ]; then - alsactl init - fi - fi + if dpkg --compare-versions "$2" le "1.0.23-2ubuntu3.3"; then + for idfile in /proc/asound/card*/id; do + card=`echo "$idfile" | cut -d'/' -f4 | tr -d '^card'` + id=`cat "$idfile"` + if [ "$id" = "Panda" -o "$id" = "SDP4430" ]; then + # for these versions of alsa-utils, for these cards, we need to call alsactl init on the card once to activate them + # on later boots the state file handles this + alsactl init $card + fi + done + fi ;; abort-upgrade|abort-remove|abort-deconfigure) # Nothing to do because we didn't take any action in the prerm