| Server IP : 82.208.35.60 / Your IP : 216.73.216.89 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/multimedia/makemkv/files/ |
Upload File : |
#!/bin/sh trap 'rm -fr $TMPFIFODIR' EXIT TMPFIFODIR=$(mktemp -d) mkfifo $TMPFIFODIR/campipe SGDEVS= rm -fr %%LINUXBASE%%/etc/makemkv/devices rm -fr %%LINUXBASE%%/etc/makemkv/drivers camcontrol devlist | grep -E '[(,]cd[0-9]+[,)]' > $TMPFIFODIR/campipe & while read line do SCBUS=`echo $line | grep -Eo 'scbus[0-9]+' | sed -e 's:scbus::'` TARGET=`echo $line | grep -Eo 'target [0-9]+' | sed -e 's:target ::'` LUN=`echo $line | grep -Eo 'lun [0-9]+' | sed -e 's:lun ::'` SGDEV=`echo $line | grep -Eo '(.*)' | grep -Eo 'sg[0-9]+'` if [ -n "$SCBUS" -a -n "$TARGET" -a -n "$LUN" ]; then if [ -z "$SGDEV" ]; then cat <<EOF Optical drive without 'sg' device found! Make sure your kernel supports sg devices. To build a kernel with sg devices, you must add the following to your kernel configuration: device sg Refer to <https://docs.freebsd.org/en/books/handbook/kernelconfig/#kernelconfig-building> for building a custom kernel. When finished, re-run this script (update-makemkv-drives). EOF exit 1 fi SGDEVS="$SGDEVS /dev/$SGDEV" LOC=$SCBUS:0:$TARGET:$LUN mkdir -p %%LINUXBASE%%/etc/makemkv/devices/$LOC/scsi_generic/$SGDEV mkdir -p %%LINUXBASE%%/etc/makemkv/drivers/sr ln -s ../../devices/$LOC %%LINUXBASE%%/etc/makemkv/drivers/sr/$LOC echo 5 >%%LINUXBASE%%/etc/makemkv/devices/$LOC/type fi done < $TMPFIFODIR/campipe if [ -z "$SGDEVS" ]; then cat <<EOF No usable optical drives found. Make sure your drive (/dev/cd*) is available. Check the output of "camcontrol devlist". When finished, re-run this script (update-makemkv-drives). EOF exit 1 fi echo devices linked: $SGDEVS. echo "When your configuration changes, re-run this script (update-makemkv-drives)."