diff --git a/README.md b/README.md index 0fe2238..d85109d 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ https://osmocom.org/projects/rtl-sdr/wiki thus can be used without blacklisting dvb_usb_rtl28xxu below /etc/modprobe.d/ - this allows to use a second RTL dongle for use with DVB in parallel - the IDs can be programmed with 'rtl_eeprom -n' or 'rtl_eeprom -g realtek_sdr' +- for permanent blacklisting you might check/call following from the clone git directory + * ./install-blacklist.sh # Contributing diff --git a/install-blacklist.sh b/install-blacklist.sh new file mode 100755 index 0000000..c9b3a47 --- /dev/null +++ b/install-blacklist.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +BLACKLIST_FN="" +if [ -f /etc/modprobe.d/rtlsdr-blacklist.conf ]; then + BLACKLIST_FN="rtlsdr-blacklist.conf" + echo "found /etc/modprobe.d/${BLACKLIST_FN}" +elif [ -f /etc/modprobe.d/blacklist-rtl8xxxu.conf ]; then + BLACKLIST_FN="blacklist-rtl8xxxu.conf" + echo "found /etc/modprobe.d/${BLACKLIST_FN}" +elif [ -f /etc/modprobe.d/raspi-blacklist.conf ]; then + BLACKLIST_FN="raspi-blacklist.conf" + echo "found /etc/modprobe.d/${BLACKLIST_FN}" +else + BLACKLIST_FN="rtlsdr-blacklist.conf" + echo "could not find existing blacklist. will use /etc/modprobe.d/${BLACKLIST_FN}" +fi + +if [ -f /etc/modprobe.d/${BLACKLIST_FN} ]; then + cat /etc/modprobe.d/${BLACKLIST_FN} rtlsdr-blacklist.conf | sort | uniq >/dev/shm/${BLACKLIST_FN} + cp /dev/shm/${BLACKLIST_FN} /etc/modprobe.d/${BLACKLIST_FN} + echo "updated /etc/modprobe.d/${BLACKLIST_FN} ; reboot to apply" +else + cp rtlsdr-blacklist.conf /etc/modprobe.d/${BLACKLIST_FN} + echo "created /etc/modprobe.d/${BLACKLIST_FN} ; reboot to apply" +fi + diff --git a/rtlsdr-blacklist.conf b/rtlsdr-blacklist.conf new file mode 100644 index 0000000..72d5126 --- /dev/null +++ b/rtlsdr-blacklist.conf @@ -0,0 +1,6 @@ +blacklist dvb_usb_rtl28xxu +blacklist dvb_usb_v2 +blacklist rtl_2830 +blacklist rtl_2832 +blacklist r820t +blacklist rtl8xxxu