LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-01-2010, 01:19 PM   #1
erezscgb
LQ Newbie
 
Registered: Feb 2010
Posts: 3

Rep: Reputation: 0
problem with restart script in perl


hello
i'm writing a script that perform a restart loop.
when the computer boots, it runs a perl script (that's in init.d folder) and perform restart by writing
sleep(40);
exec("reboot");
(i've changed the reboot so it can be ran without password).
thing is, when the system reboots the grub menu opens (not always, about 1 out of 2 times) and the user has to press "enter" in order for the system to boot.
i've changed the /etc/default/grub file so it'll timeout after 1sec (and ran update-grub) but sometimes the menu loads and does boot after 1sec automaticaly as it should.
how can i disable the menu from loading at all?
i'm using ubuntu 9.10 and GRUB 1.97.

if this is the wrong forum pls refer me to the right one

thanks a lot in advance!!!

Last edited by erezscgb; 02-01-2010 at 01:20 PM.
 
Old 02-01-2010, 07:01 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Edit /boot/grub/menu.lst and change the timeout:

Code:
timeout=0
cheers
 
Old 02-02-2010, 02:52 AM   #3
erezscgb
LQ Newbie
 
Registered: Feb 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kbp View Post
Edit /boot/grub/menu.lst and change the timeout:

Code:
timeout=0
cheers
the new grub2 doe not have menu.lst and instead it has the file
/etc/default/grub which i did change to timeout=0
 
Old 02-02-2010, 03:12 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
And does the grub menu still appear ?
 
Old 02-03-2010, 03:27 AM   #5
erezscgb
LQ Newbie
 
Registered: Feb 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kbp View Post
And does the grub menu still appear ?
yeah...that's the problem=\
 
Old 02-03-2010, 06:23 AM   #6
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
I don't have grub2 available to test, but apparently now you need to run 'grub-mkconfig' after editing files.. did you ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with using else statement in perl script deeptic Programming 1 09-07-2009 03:07 PM
cron: problem with perl script Clemente Linux - Software 4 05-10-2006 02:30 PM
Perl Script /MySQL Problem domquem Programming 2 01-10-2006 06:57 AM
Converting a Windows Perl script to a Linux Perl script. rubbercash Programming 2 07-19-2004 10:22 AM
Problem with a perl script Nexis Linux - Software 3 08-08-2002 08:51 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration