Alternatively you could allow to install the package, but to
automatically rename the important files. You need to verify the script
yourself, actually I don't know if I made a typo and if there is any
reason for the sed command. You also need to check if I missed another
important file. However, once you run dpkg-divert it automatically works
each time pulseaudio gets installed/upgraded.
#!/bin/bash
divert () {
cat<<EOF
#!/bin/dash
name=\$(echo \$(basename \$0) | sed -e 's/[0-9]\+ *//')
printf "\n \033[7m\$(basename \$0) was renamed \$name.real\033[0m\n\n"
exit
EOF
}
for s in /etc/xdg/autostart/pulseaudio.desktop \
/usr/bin/pulseaudio \
/usr/bin/start-pulseaudio-x11 \
do
dpkg-divert --add --rename --divert $s.real $s && divert > $s
chmod a+x $s
done
exit
Actually I once wrote a script, that works, to safely get rid of GRUB
crap:
[rocketmouse@archlinux ~]$ cat /mnt/moonstudio/usr/src/dpkg-divert-grub.sh
#!/bin/bash
divert () {
cat<<EOF
#!/bin/dash
name=\$(echo \$(basename \$0) | sed -e 's/[0-9]\+ *//')
printf "\n \033[7m\$(basename \$0) was renamed \$name.real\033[0m\n\n"
exit
EOF
}
case $1 in
--add)
for s in grub-mkconfig update-grub
do
s=/usr/sbin/$s
dpkg-divert --add --rename --divert $s.real $s && divert > $s
chmod a+x $s
done;;
--remove)
for s in grub-mkconfig update-grub
do
s=/usr/sbin/$s
rm $s && dpkg-divert --rename --remove $s
done;;
--list)
dpkg-divert --list | grep "local diversion of"
ls -hlv /usr/sbin/grub-mkconfig* /usr/sbin/update-grub*|grep -v "gf"
;;
*)
cat $0;
esac
exit
--
ubuntu-studio-users mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-studio-users