[mythtv-users] FC3 MythTV Setup Script

Tom E. Craddock, Jr. sigtom at sigtom.com
Tue Dec 7 06:29:57 UTC 2004


Ryan Pisani wrote:

>'ll get mention of it into the docs themselves. I've got some other
>  
>
>>ideas relating to kickstarts floating around in my head, it would be nice
>>to
>>tie a kickstart together with some of your stuff...
>>
>>    
>>
>
>
>I was thinking of doing the same thing actually. A few months back, I
>finished customizing an RHEL3 kickstart image for my company. I did both
>cdrom customization & a network based install package. It would actually
>be quite easy to do with a stable version of the Axel's packages, or
>dynamically with apt of course.  I'm working on some house projects at the
>moment, but I will definetly get the FC3 script up and running soon.  Let
>me know about kickstart - I'd love to be involved.
>
>regards,
>Ryan
>
>
>
>  
>
>>On Sunday 05 December 2004 17:25, Ryan Pisani wrote:
>>    
>>
>>>About six months ago I made a scripted version of Jarod's Fedora mythtv
>>>setup (http://wilsonet.com/mythtv)available at frouse3.homelinux.com.
>>>About 2 weeks ago I rebuilt my home-web server and the script has since
>>>been offline. In the last few weeks I've had some requests for the
>>>script
>>>- so I've gone and created a forum on a real web server. I've posted the
>>>original FC1 script as well as a sloppy FC2 version at
>>>forum.linuxisahobby.com. I intend on making a fully functional mythtv /
>>>Linux forum - (maybe there is no use for another one out there - but oh
>>>well).  When my schedule free's up I'll make an FC3 version (THANKS
>>>JAROD
>>>:).
>>>      
>>>
>>:-)
>>
>>    
>>
>>>So for anyone that wants to download the script go for it, and if
>>>anyone wants to kick off the forum feel free. I'd appreciate input as to
>>>what topics are necessary / desired.
>>>      
>>>
>>Cool, I actually finally got back to looking at the older version a week
>>or
>>two ago, and found only the FC1 version. Glad to hear about the update,
>>and I
>>swear I
>>--
>>Jarod C. Wilson, RHCE
>>jarod at wilsonet.com
>>
>>Got a question? Read this first...
>>     http://catb.org/~esr/faqs/smart-questions.html
>>MythTV, Fedora Core & ATrpms documentation:
>>     http://wilsonet.com/mythtv/
>>MythTV Searchable Mailing List Archive
>>     http://www.gossamer-threads.com/lists/mythtv/
>>_______________________________________________
>>mythtv-users mailing list
>>mythtv-users at mythtv.org
>>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>
>>    
>>
>
>_______________________________________________
>mythtv-users mailing list
>mythtv-users at mythtv.org
>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-user
>  
>

I kinda hacked my way thru the FC2 version of your script and think Ive 
got it working for FC3.  Im installing it now with the script and 
letting it run before I post it anywhere.  If your interested in it, Ive 
attached it; if it works well, would you mind if I posted it at your 
forums and on the mythtv-users list? 

Tom E. Craddock, Jr.
sigtom at sigtom.com
-------------- next part --------------
#!/usr/bin/perl


$ENV{PATH}="/bin:/usr/sbin:/usr/local/bin:/usr/bin:/sbin:./:~/";

# Created by Ryan Pisani 3/04/04
# http://frouse3.homelinux.com/
# Modifications by Jarod Wilson, 2004.03.14
# Modifications by Ryan Pisani, 2004.05.06
# Updated original script for Fedora Core 2



# Global Declarations
# Newest kernel information can be found at: 
# http://atrpms.net/dist/fc1/kernel/
chomp(my $newkernel="2.6.9-1.681_FC3");
chomp(my $created="12/7/2004");
chomp(my $atrpm="25-1.rhfc3.at.i386");



#Verifying the user is logged in as root before continuing
chomp(my $id = `id -u`);
                                                                                                                                
if ( $id ne '0' ) {
                                                                                                                                
print "\nYou must be logged in as root to execute this script!!\n\n";
                                                                                                                                
exit;
}
#end root check                                                                                                                                






#Checking Current Kernel
chomp(my $kernel=`/bin/uname -r`);
system("clear");


#Checking if this is the first time the script has been run

if ( -e "/tmp/.make_myth" ) {

menu();

}

else {

system("touch /tmp/.make_myth");

print <<DISCLAIMER;


				
	This script is intended to assist in installing and configuring
	MythTv on RedHat's Fedora Core 2. It is basically a compliment of 
	Jarod's guide found at http://www.wilsonet.com/mythtv/fcmyth.php
	and will work with a Hauppauge WinTV PVR-250, PVR-350 and
	AVerMedia M179.

		   NOTE: This script MUST be run as root.

	
	       	      !!!!! USE AT YOUR OWN RISK !!!!!

	
	        Created by Ryan http://frouse3.homelinux.com/


DISCLAIMER

print "Starting in...\n\n";
timer(11);

print "\nOpening Jarod's page for reference\n";
system("mozilla http://www.wilsonet.com/mythtv/fcmyth.php&");
sleep 1;
system("clear");
menu();
}






##Draws the main menu
sub menu {

print <<MENU;

	Mythtv Setup Script modified: $created
	
	1. Create MythTV user
	2. Get and Update rpms
	3. Update to newest ATrpms kernel
	4. Install nVidia graphics drivers (Only if Nvidia card present)
	5. Remove old OSS sound drivers (only if you want to change to alsa)
	6. Install ALSA sound drivers (Not Mandatory)
	7. Get and install MythTV suite
	8. Install IVTV drivers
	9. Choose a card configuration 
       10. Choose a tv standard
       11. Get LIRC (IR)
       12. Configure MySQL
       13. Read Jarod's Mythfrontend Setup Guide

       		
		(q) - to quit

MENU
print "Make a selection: ";

chomp(my $choice=<STDIN>);
if ($choice eq '1') {
	useradd();
}
elsif ($choice eq '2') {
	apt_get();
}
elsif ($choice eq '3') {
	kernel_up();
}
elsif ($choice eq '4') {
	nvidia();
}
elsif ($choice eq '5') {
	nukeoss();
}
elsif ($choice eq '6') {
	alsa();
}
elsif ($choice eq '7') {
	myth();
}
elsif ($choice eq '8') {
	ivtv();
}
elsif ($choice eq '9') {
	card();
}
elsif ($choice eq '10') {
	ivtv_conf();
}
elsif ($choice eq '11') {
	lircd();
}
elsif ($choice eq '12') {
	mysqld();
}
elsif ($choice eq '13') {
	jarods();
}
elsif ($choice eq 'q') {
	exit;
}
else {
	print "Invalid selection!\n";
	menu();
}



}
###END MENU



###Creates the mythtv user account
sub useradd {

	print <<END;

 	This will create a mythtv user with home /home/mythtv
	and a default password of 'mythtv'. As root, you can 
        execute 'passwd mythtv' to set a new password.

END
	sleep 2;

	my $out=`useradd -d /mythtv -m -s /bin/bash -p '\$1\$2tMnJ0\$Kg0iY9suj62QuuSNDEi.D1' mythtv`;

	menu();
}
#End useradd



###Retrieves and configures atrpms & updates the system
sub apt_get {
	undef my $choice;

	print <<STOP;

	
	There are 2 options for retrieving the atrpms-kickstart
	utility. You can choose the default one in the script
	or attempt to access the web to determine the most current
        version.

	


	1. Choose hardcoded package atrpms-kickstart-$atrpm.rpm
        2. Access the web to find the newest version	
STOP
	print "\n\tChoice: ";
	chomp($choice=<STDIN>);

if ($choice eq '2') {
	print "Retrieving rpm libraries so newest atpms-kickstart can install\n\n";
	sleep 2;

	#system("rpm -Uhv http://atrpms.net/dist/fc1/rpm/librpm4.3-4.3.1-0.3_24.99.rhfc1.at.i386.rpm");
		
	print "\nChecking for wget utility in /usr/bin\n\n";

	if (-e "/usr/bin/wget") {
		print "Wget exists..continuing\n\n";
		sleep 2;
	}
	else {
		print "Can not find wget utility..Exiting\n\n";
		exit;
	}	
	
	print "Determining newest version of atrpms-kickstart...\n\n";
	sleep 2;

	system("wget http://atrpms.net/dist/fc3/atrpms-kickstart -O /tmp/atrpms.htm -o /tmp/wget.log");

	chomp(my $file=`cat /tmp/atrpms.htm`);
	chomp(($atrpm)=(split /atrpms-kickstart-(.*).rpm/, $file)[1]);
	print "\nAtrpms version $atrpm found!\n\n";
	sleep 2;
	system("rm /tmp/atrpms.htm");
}

	print "Atrpm version to be installed: atrpms-kickstart-$atrpm.rpm\n\n";
	sleep 2;

	print "\nRetrieving ATrpms kickstart utility...\n\n";
	sleep 1;	
	system("/bin/rpm -Uvh http://atrpms.net/dist/fc3/atrpms-kickstart/atrpms-kickstart-$atrpm.rpm");

	print "\nUpdating available packages list and installing packages.\n\n";

	#print "\nAnswer \"Y\" when prompted to execute system upgrade.\n\n";
	sleep 2;
	system("apt-get -y update");
	system("apt-get install apt yum");
	system("apt-get -y update");
	system("apt-get -y dist-upgrade");

#commenting out kde sources in sources.list
	print "\n\nCreating a backup of /etc/apt/sources.list as /etc/apt/sources.list.original\n\n";
	system("cp /etc/apt/sources.list /etc/apt/sources.list.original");
	sleep 2;
	@SOURCES=`cat /etc/apt/sources.list.original`;
	open(NEWSOURCE,">/etc/apt/sources.list");

		for (my $i=0;$i<=$#SOURCES;$i++) {
		      if ($SOURCES[$i] =~ /kde/) {
			 print NEWSOURCE "#$SOURCES[$i]";
		      }
		      else {
			 print NEWSOURCE "$SOURCES[$i]";
		      } 
		}

	close NEWSOURCE;	

	menu();
}		
	




#Updates Kernel to the one specified in $newkernel
sub kernel_up {


	print <<STOP;

	
	Your kernel is about to updated to $newkernel 
	If you do not see a version number above something is very
	very wrong. Exit immediately if this is the case.

	Continuing in...

STOP
	timer(11);	

	 
	if ($kernel eq $newkernel) {
	 print "\n!! You already have $newkernel installed !!\nGo on to the next step...\n";
         menu();
 	}
	else {
		system("apt-get update");

		print "Beginning kernel upgrade from $kernel... This may take some time\n\n";

        system("apt-get install kernel#$newkernel kernel-source#$newkernel");
	print "\nCreating a backup of /boot/grub/grub.conf as /boot/grub/grub.conf.original\n\n";
	system("cp /boot/grub/grub.conf /boot/grub/grub.conf.original");
	sleep 1;
	@GRUB=`cat /boot/grub/grub.conf.original`;	
		print "Updating default boot kernel in /etc/grub.conf\n";
	open(NEWGRUB,">/boot/grub/grub.conf");
		for (my $i=0;$i<=$#GRUB;$i++) {
			if ($GRUB[$i] =~ /default=/) {
			    print NEWGRUB "default=0\n";
			}
			else {
			    print NEWGRUB "$GRUB[$i]";
			}
		}
	close NEWGRUB;
	print "Verify your grub.conf file to make sure it looks complete\n\n";
	sleep 1;
	print "If grub.conf is screwed, so is your machine!!!\n\n";
	sleep 3;
	system("cat /etc/grub.conf | more");
	sleep 10;

	print "Exiting... You must reboot to use your new kernel...\n\n";
	print "Unless you hit Ctrl-C, your system will automatically reboot in:\n\n";
	timer(11);

	print "System restarting now!\n";
	system("reboot");
	exit;
	}
}
	


##Retrieves and installs Nvidia video drivers
sub nvidia {
	print "Downloading and installing nVidia graphics driver...\nAnswer Y if prompted\n\n";
	system("apt-get install nvidia-graphics6629-kmdl-$kernel");
	system("apt-get install nvidia-graphics6629");
	print "Moving /etc/X11/xorg.conf to /etc/xorg.conf.original\n\n";	
	system("cp /etc/X11/xorg.conf /etc/X11/xorg.conf.original");
	sleep 1;

	if (-e "/etc/X11/xorg.conf.nvidia" ) {
	@XFREE=`cat /etc/X11/xorg.conf.nvidia`;
	}
	else {
	die "Cannot find /etc/X11/xorg.conf.nvidia";
	}

	open(NEW,">/etc/X11/xorg.conf") || die "Failed to open xorg.conf";
	for (my $i=0;$i<=$#XFREE;$i++) {
		if ($XFREE[$i] =~ /Load  "type1"/) {
			print NEW "$XFREE[$i]";
			print NEW "	Load  \"v4l\"\n";
		}
		else {
			print NEW "$XFREE[$i]";
		}
	}	
	close NEW;
	print "Your X session will now be reloaded with your new drivers.\n";
	print "You should see an nVidia logo if they've loaded correctly.\n";
	sleep 2;
	system("init 3 && init 5");
	menu();
}



## Removes old sound modules
sub nukeoss {

	print "Creating a backup of /etc/modprobe.conf as /etc/modprobe.conf.original\n\n";

	system("mv /etc/modprobe.conf /etc/modprobe.conf.original");	
	sleep 1;
	print "Removing old sound modules from /etc/modprobe.conf\n\n";
	sleep 1;
	@MODULES=`cat /etc/modprobe.conf.original`;
	open(MODNEW,">/etc/modprobe.conf") || die "Cannot open /etc/modprobe.conf";
	for (my $i=0;$i<=$#MODULES;$i++) {
		if ($MODULES[$i] =~ /sound/ || $MODULES[$i] =~ /snd/ ) {
		print "Removing $MODULES[$i] from /etc/modprobe.conf\n";
		}
		else {
			print MODNEW "$MODULES[$i]";
		}

	}
	close MODNEW;
	print "\nYou must either manually remove your old OSS sound drivers, or simply let your system reboot!\n\n";
	print "Unless you hit Ctrl-C, your system will automatically reboot in:\n";
	timer(11);	
	print "System restarting now!";
	system("reboot");
	exit;
exit;
}



##Retrieves and installs alsa sound drivers
sub alsa {

	print "Downloading and installing ALSA drivers...\n\n";
	system("apt-get install alsa-utils");
	system("apt-get install alsa-kmdl-$kernel");
	system("apt-get install alsa-driver");
	#system("apt-get install gnome-alsamixer");
	print "Running /usr/sbin/alsaconf\n\n";	 
	sleep 1;
	print "Make sure to say 'yes' to modifying /etc/modprobe.conf\n\n";
	sleep 3;
	system("/usr/sbin/alsaconf");
	print "Pausing 10 seconds to verify /etc/modprobe.conf:\n\n";
	system("cat /etc/modprobe.conf | more");
	sleep 10;
	print "You need to manually create a ~/.asoundrc\n\n";
	print "Opening alsa web page to find .asoundrc specs\n\n";
	sleep 5;
	system("mozilla www.alsa-project.org/alsa-doc/&");


	print "Use /usr/bin/kmix to adjust volume and settings\n
		then use \"/usr/sbin/alsactl store\" to save settings\n";
	sleep 2;
menu();

}


##Retrieves and installs myth suite
sub myth {
	print "Downloading and installing MythTV suite from ATrpms\n";
	sleep 1;
	system("apt-get install mythtv-suite");
	system("chkconfig mythbackend on");
menu();

}


##Retrieves and installs ivtv modules
sub ivtv {
	print "Downloading and installing drivers for PVR-x50/M179,\n";
	print "answer Y when prompted.\n";
	system("apt-get install ivtv-firmware");
	system("apt-get install kernel-module-ivtv-$kernel");
	system("apt-get install ivtv");

menu();
}	



##Configures /etc/modprobe.conf and capture card based on user
##selected standard
sub card {
	undef my $card;

print <<END;
	Choose a card configuration:

	1. Configure for PVR-250 or M179
	2. Configure for PVR-350 (Svideo out)
	3. Configure for PVR-350 (Compostite out)
	4. Back to Main
	

END
print "Choose a card: ";
chomp(my $card=<STDIN>);

if ($card eq '1') {
	pvr250();
}
elsif ($card eq '2' || $card eq '3') {
	pvr350($card);
}
else {
	menu();
}
}
#end card select
#


##Configures standard specific options
sub ivtv_conf {

	print <<END;

	Choose your tv standard:

	1. NTSC standard (North America)
	2. PAL standard (Europe)
	3. SECAM standard (France)
	4. Back to Main
END
print "Choose a standard: ";
chomp($ivtvtype=<STDIN>);

if ($ivtvtype eq '1') {
	ntsc();
} 
elsif ($ivtvtype eq '2' || $ivtvtype eq '3') {
	palsec($ivtvtype);
}
else {
	menu();
}

}

##end ivtv_conf


sub pvr250 {
	print "\nEditing /etc/modprobe.conf with ivtv info for PVR-250/M179\n\n";
	print "Creating backup of /etc/modprobe.conf to /etc/modprobe.conf.pre-pvr250\n\n";
	system("cp /etc/modprobe.conf /etc/modprobe.conf.pre-pvr250");
	sleep 1;
	open (IVTV,">>/etc/modprobe.conf") || die "Cannot open /etc/modprobe.conf";
	print IVTV <<STOP;
# ivtv modules setup
alias char-major-81 videodev
alias char-major-81-0 ivtv
#install ivtv /sbin/modprobe --ignore-install ivtv; /sbin/modprobe ivtv-fb
#options ivtv ivtv_debug=1 mpg_buffers=90
#options msp3400 once=1 simple=1
#add below ivtv msp3400 saa7115 tuner
STOP
	close IVTV;

	print "Attempting to load ivtv modules\n";
        system("depmod -a");
        system("modprobe ivtv");
	
	print "Outputting lspci for device list to verify card appears\n\n";
	system("lspci -v | more");
	sleep 2;

	my $checkdmesg=`dmesg | grep tuner`;
              
	if ($checkdmesg =~ /tuner/ ) {
		print "Tuner found!!!\n";
	}
	else {
		print "Tuner not found in dmesg output\n";
	}
	sleep 2;	
menu();	
}




sub pvr350 {

	chomp(my $type=$_[0]);
        print "Editing /etc/modprobe.conf with ivtv info for PVR-350\n";
        print "Creating backup of /etc/modprobe.conf /etc/modprobe.conf.pre-pvr350\n";
        system("cp /etc/modprobe.conf /etc/modprobe.conf.pre-pvr350");
        sleep 1;
                                                                       
        open (IVTV,">>/etc/modprobe.conf") || die "Cannot open /etc/modprobe.conf";
	if ($type eq '2') {
	chomp($output = '1');
	}                                                                              	else {
	chomp($output = '0'); 
	}
        print IVTV <<STOP;
# ivtv modules setup
alias char-major-81 videodev
alias char-major-81-0 ivtv
install ivtv /sbin/modprobe --ignore-install ivtv; /sbin/modprobe ivtv-fb
#options saa7127 enable_output=1 output_select=$output
#options msp3400 once=1 simple=1
#add below ivtv msp3400 saa7115 saa7127 tuner
#add above ivtv ivtv-fb 
STOP
       close IVTV;


	print "Attempting to load ivtv modules\n";
	system("depmod -a");
	system("modprobe ivtv");
	
	print "Outputting lspci for device list to verify card appears\n";
	sleep 1;
        system("lspci -v | more");

	my $checkdmesg=`dmesg | grep tuner`;
              
	if ($checkdmesg =~ /tuner/ ) {
		print "Tuner found!!!\n";
	}
	else {
		print "Tuner not found in dmesg output\n";
	}
	sleep 2;	

	print "This just set up the card for tuner and output type selection. Follow the
	rest of Jarod's guide for making X work with PVR-350 tv-out.\n\n";
	sleep 3;
menu();
	
}                                             


sub ntsc {
	print "Configuring for NTSC TV standard\n";
	print "Creating backup of /etc/modprobe.conf to /etc/modprobe.conf.preNTSC\n\n";
	system("cp /etc/modprobe.conf /etc/modprobe.conf.preNTSC");
	sleep 1;
	@NTSC=`cat /etc/modprobe.conf.preNTSC`;
	open (MODULES,">/etc/modprobe.conf");

	for (my $i=0;$i<=$#NTSC;$i++) {
		print MODULES "$NTSC[$i]";
		if ($NTSC[$i] =~ /mpg_buffers=90/ ) {
			print MODULES "options tuner type=2 # NTSC tuner\n";
		}
	}
	close MODULES;

	system("ivtvctl -u 0x3000");
	system("ivtvctl -p 4");
	system("ivtvctl -f width=720,height=480");
	system("ivtvctl -v input=3,output=1");

	
	menu();
}




sub palsec {
	my $standard=$_[0];
	if ($standard eq '2') {

		print "Configuring for PAL TV standard\n\n";
		system("/ivtvctl -u 0xff");
		print "Creating backup of /etc/modprobe.conf to /etc/modprobe.conf.prePAL\n\n";
		system("cp /etc/modprobe.conf /etc/modprobe.conf.prePAL");
		system("/sbin/modprobe tveeprom");
		sleep 1;
		my $dmesg=`dmesg | grep tuner | grep type=`;
		chomp(($type)=(split /type=(.*)\)/, $dmesg)[1]);
		#print "$type\n";
	
		@PAL=`cat /etc/modprobe.conf.prePAL`;
		open (MODULES,">/etc/modprobe.conf.pal");

		for (my $i=0;$i<=$#PAL;$i++) {
			print MODULES "$PAL[$i]";
			if ($PAL[$i] =~ /mpg_buffers=90/ ) {
				print MODULES "options tuner type=$type # PAL tuner\n";
			}
		}
	close MODULES;
	}
	else {
	print "Configuring for SECAM TV standard\n";
        system("ivtvctl -u 0x7f0000");

	print "Creating backup of /etc/modprobe.conf to /etc/modprobe.conf.preSECAM\n\n";
	system("cp /etc/modprobe.conf to /etc/modprobe.conf.preSECAM");
	sleep 1;

		system("/sbin/modprobe tveeprom");
		$dmesg=`dmesg | grep tuner | grep type=`;
		chomp(($type)=(split /type=(.*)\)/, $dmesg)[1]);
		#print "$type\n";
	
		@SECAM=`cat /etc/modprobe.conf.preSECAM`;
		open (MODULES,">/etc/modprobe.conf");

		for (my $i=0;$i<=$#SECAM;$i++) {
			print MODULES "$SECAM[$i]";
			if ($SECAM[$i] =~ /mpg_buffers=90/ ) {
				print MODULES "options tuner type=$type # SECAM tuner\n";
			}
		}
	close MODULES;
	
	}
	
	system("ivtvctl -p 4");
	system("ivtvctl -f width=720,height=576");
	system("ivtvctl -v input=3,output=1");
	menu();
}


sub lircd {
	print "Downloading and installing LIRC driver and utilities\n\n";

	system("apt-get install lirc-kmdl-$kernel");
	system("apt-get install lirc");
	system("cp /usr/share/doc/ivtv-*/lircd-g.conf /etc/lircd.conf");
		
	print "Adding LIRC info /etc/modprobe.conf\n\n";
	print "Creating backup /etc/modprobe.conf.pre-lirc\n\n";
	sleep 1;
	system("cp /etc/modprobe.conf /etc/modprobe.conf.pre-lirc");

	@LIRC=`cat /etc/modprobe.conf.pre-lirc`;

	open(MOD,">/etc/modprobe.conf");

	for (my $i=0;$i<=$#LIRC;$i++) {
		if ($LIRC[$i] =~ /alias/) {
			print MOD "$LIRC[$i]";
			print MOD "alias char-major-61 lirc_i2c\n";
			while ($i!=$#LIRC) {
				$i++;
				print MOD "$LIRC[$i]";
			}
		}
		else {
			print  MOD "$LIRC[$i]";
		}
	}
	close MOD;
	
	system("echo install lirc_i2c /sbin/modprobe ivtv; /sbin/modprobe --ignore-install lirc_i2c >>/etc/modprobe.conf");


	print "Verify your modprobe.conf file:\n\n";
	sleep 2;
	system("cat /etc/modprobe.conf");
	sleep 8;

	system("depmod -a");
	system("modprobe lirc_dev");
	system("modprobe lirc_i2c");
	system("chkconfig lircd on");
	system("service lircd start");

	print "To test your remote, execute /usr/bin/irw, point the remote at the receiver and press some buttons.\n\n";
	sleep 4;
	system("wget http://wilsonet.com/mythtv/lircrc-haupgrey.txt");
	system("mkdir /home/mythtv/.mythtv");
	system("mv lircrc-haupgrey.txt /home/mythtv/.mythtv/lircrc");
	system("ln -s /home/mythtv/.mythtv/lircrc /home/mythtv/.lircrc");
	menu();

	
}



sub mysqld {

	print "Starting MySQL setup\n\n";

        system("chkconfig mysqld on");
	system("service mysqld start");
	
	print "Initializing MythTV database\n\n";
	system("mysql -u root < /usr/share/doc/mythtv-*/database/mc.sql");
	print "Starting MythTV backend server process\n\n";
	system("service mythbackend start");
	menu();
}


sub jarods {


	print "Opening Jarod's page to MythTV configuration portion\n";
	system("mozilla http://www.wilsonet.com/mythtv/fcmyth.php#setupmythtv&");

}




sub timer {
                                                                                                                                
chomp(my $time=$_[0]);
                                                                                                                                
	while ($time ne "1") {
        	$time--;
        	print "$time...\n";
        	sleep 1;
        }
}



More information about the mythtv-users mailing list