LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Script wont call my other scripts (https://www.linuxquestions.org/questions/linux-newbie-8/script-wont-call-my-other-scripts-780610/)

replica88 01-07-2010 01:43 PM

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


Tinkster 01-07-2010 01:56 PM

Quote:

Originally Posted by replica88 (Post 3817863)
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

replica88 01-07-2010 04:48 PM

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

Tinkster 01-07-2010 05:09 PM

Just remove the leading dots =}


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