LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-07-2010, 01:43 PM   #1
replica88
Member
 
Registered: Nov 2009
Posts: 48

Rep: Reputation: 15
Script wont call my other scripts


I have 3 scripts that need to be run from the cd, I can run them separately but thought it would be easier to just call them from a single script.

When I run the script it just goes straight to reboot, which is the last command. Can you see what I am doing wrong? I am logged in as root when I execute it. Thanks

Code:
#!/bin/bash
clear
set +x

#calls script that installs the software packages
./cdrom/scripts/initialsetup.txt

#calls script that creates shared folders
./cdrom/scripts/makeshares.txt

#calls script that creates users
./cdrom/scripts/makeusers.txt

#unmounts cdrom
umount /cdrom

echo "Setup complete, issueing reboot command"

reboot
 
Old 01-07-2010, 01:56 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,977
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Quote:
Originally Posted by replica88 View Post
I have 3 scripts that need to be run from the cd, I can run them separately but thought it would be easier to just call them from a single script.

When I run the script it just goes straight to reboot, which is the last command. Can you see what I am doing wrong? I am logged in as root when I execute it. Thanks

Code:
#!/bin/bash
clear
set +x

#calls script that installs the software packages
./cdrom/scripts/initialsetup.txt

#calls script that creates shared folders
./cdrom/scripts/makeshares.txt

#calls script that creates users
./cdrom/scripts/makeusers.txt

#unmounts cdrom
umount /cdrom

echo "Setup complete, issueing reboot command"

reboot
Guess it all depends on which directory you run this from as
you chose the RELATIVE PATH ./cdrom/scripts ...


Cheers,
Tink
 
Old 01-07-2010, 04:48 PM   #3
replica88
Member
 
Registered: Nov 2009
Posts: 48

Original Poster
Rep: Reputation: 15
yes, I see what you mean.

I ran the script from / with ./cdrom/scripts/master.txt next time I test it I will first cd to /cdrom/scripts and run it from there

Thanks
 
Old 01-07-2010, 05:09 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,977
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Just remove the leading dots =}
 
  


Reply

Tags
script


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to Write & Call Functions Within Shell Scripts senthilmuthiah Linux - Newbie 2 03-27-2009 06:36 PM
Can bash scripts call graphical windows? Gum Linux - Newbie 2 03-12-2009 05:45 AM
How can I script an autologin, automatically call kde(or simillar) and call an app aboaventura Slackware 8 02-03-2007 11:00 PM
call php scripts djgerbavore Programming 3 11-30-2004 07:17 AM
how to call c programm from perl scripts akaash Programming 4 03-18-2004 07:41 PM


All times are GMT -5. The time now is 08:16 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration