cdre sh
 

cdre sh

 

This post was last updated on June 1st, 2020 at 07:06 pm

test `whoami` = 'root' || echo "You must be root to execute the commands."
cdrecord -scanbus > /dev/null
if ! (pidof kerneld || test -f "/proc/sys/kernel/modprobe"); then
    echo "Neither kerneld nor kmod are running to automatically load modules".
fi
report_no_autoload() {
    echo "Ensure the module $1 is loaded automatically next time."
}
if test ! -f "/proc/scsi/scsi"; then
    report_no_autoload scsi_mod  &&  insmod scsi_mod
fi
if ! grep "^........ sg_" /proc/ksyms > /dev/null; then
    report_no_autoload sg  &&  insmod sg
fi
if ! grep "^........ sr_" /proc/ksyms > /dev/null; then
    report_no_autoload sr_mod  &&  insmod sr_mod
fi
if ! grep "^........ loop_" /proc/ksyms > /dev/null; then
    report_no_autoload loop  &&  insmod loop
fi
if ! grep iso9660 /proc/filesystems > /dev/null; then
    report_no_autoload iso9660  &&  insmod iso9660
fi
echo "The following is only needed for IDE/ATAPI CD-writers."
if ! grep ide-scsi /proc/ide/drivers > /dev/null; then
    report_no_autoload ide-scsi  &&  insmod ide-scsi
fi
cdrecord -scanbus

options ide-cd ignore=hdb            # tell the ide-cd module to ignore hdb
alias scd0 sr_mod                    # load sr_mod upon access of scd0
#pre-install ide-scsi modprobe imm    # uncomment for some ZIP drives only
pre-install sg     modprobe ide-scsi # load ide-scsi before sg
pre-install sr_mod modprobe ide-scsi # load ide-scsi before sr_mod
pre-install ide-scsi modprobe ide-cd # load ide-cd   before ide-scsi
Previous Displaying Remote Applications on your Local Workstation
Next ACPI HOWTO
 

About author

shibaa987
shibaa987 275 posts

Linux kernel developer and a firmware developer with an experience of 10+ years.

View all posts by this author →

You might also like

Scripting 0 Comments

Script to Make an Instagram Bot to get Followers

Backstory: So last week during my internship one of the work assigned to me was to go and follow some random profiles on Instagram through the company’s page. You might wonder why

Scripting 0 Comments

Web Site Publishing Submit Scripts

This post was last updated on November 3rd, 2020 at 06:18 pmContents1 Submit2 Datesort.sh Shell Script3 Do_datesort.sh Shell Script4 Checkreqtags.sh Shell Script5 Tags.conf Configuration File6 Openclosetags.sh Shell Script7 Wwwmanage.conf Configuration

Scripting 1Comments

How to Build an Amazon Price Tracking Bot to know Price Drops

This post was last updated on March 1st, 2020 at 01:07 amHave you ever missed a good deal on a product just because you didn’t know about the discounts being

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply