# Load Core modules # insmod /opt/dvb_native/dvb-core.ko insmod /opt/dvb_native/dvb_hdhomerun_core.ko # # Load BE & FE modules # insmod /opt/dvb_native/dvb_hdhomerun.ko insmod /opt/dvb_native/dvb_hdhomerun_fe.ko # #lsmod to check if everything is running #grep -i dvb /proc/devices # DYNAMIC_ID=$(grep hdhomerun_control /proc/misc | awk "{print \$1}") if [ "$DYNAMIC_ID" != "" ]; then echo "making node hdhomerun_control" $DYNAMIC_ID mknod /dev/hdhomerun_control c 10 $DYNAMIC_ID else echo "Unable to detect hdhomerun_control inside /proc/misc." fi # Set permissions chmod 666 /dev/hdhomerun_control chown root:root /dev/hdhomerun_control # # Clear userhdhomerun log rm -f "/opt/dvbhdhomerun/dvbhdhomerun.log" # # Run userhdhomerun with LD_PRELOAD /opt/dvbhdhomerun/userhdhomerun/build/userhdhomerun \ -f -u root -g root -l "/opt/dvbhdhomerun/dvbhdhomerun.log" # sleep 1 # # Retrieve the major device number for DVB # (normally it should be 212) DYNAMIC_ID=$(grep DVB /proc/devices | awk "{print \$1}") if [ "$DYNAMIC_ID" != "" ]; then echo "Creating DVB device nodes to major device #$DYNAMIC_ID..." # Create device nodes for DVB mkdir -p /dev/dvb/adapter0 DYNAMIC_ID2=$(cut -f2 -d':' /sys/class/dvb/dvb0.frontend0/dev) mknod /dev/dvb/adapter0/frontend0 c $DYNAMIC_ID $DYNAMIC_ID2 DYNAMIC_ID2=$(cut -f2 -d':' /sys/class/dvb/dvb0.demux0/dev) mknod /dev/dvb/adapter0/demux0 c $DYNAMIC_ID $DYNAMIC_ID2 DYNAMIC_ID2=$(cut -f2 -d':' /sys/class/dvb/dvb0.dvr0/dev) mknod /dev/dvb/adapter0/dvr0 c $DYNAMIC_ID $DYNAMIC_ID2 mkdir -p /dev/dvb/adapter1 DYNAMIC_ID2=$(cut -f2 -d':' /sys/class/dvb/dvb1.frontend0/dev) mknod /dev/dvb/adapter1/frontend0 c $DYNAMIC_ID $DYNAMIC_ID2 DYNAMIC_ID2=$(cut -f2 -d':' /sys/class/dvb/dvb1.demux0/dev) mknod /dev/dvb/adapter1/demux0 c $DYNAMIC_ID $DYNAMIC_ID2 DYNAMIC_ID2=$(cut -f2 -d':' /sys/class/dvb/dvb1.dvr0/dev) mknod /dev/dvb/adapter1/dvr0 c $DYNAMIC_ID $DYNAMIC_ID2 # Set permissions chmod 755 /dev/dvb/adapter* chmod 666 /dev/dvb/adapter*/* chown root:users /dev/dvb/adapter*/* else echo "ERROR: Unable to detect DVB inside /proc/devices; dvb-core.k$" exit 10 fi