Hello All,
I am new to linux and I m trying to build a series of startup scripts. My goal is to call one startup script that then calls several others based on conditions. I am starting with a simple alias script. I have read many posts on this and I feel I am very close but I missing something. The main way I have focused on is using run levels. I should also mention that I am running BT4.
I created a file in the init.d directory called callStartup. I added the neccessary permissions for it to be executable (chmod +x /etc/init.d/callStartup)
I then ran #sudo update-rc.d /etc/init.d/callStartup start 99 2 3 4 5 .
I was able to confirm that a link was placed in the appropriate run level directories.
in callStartup, I only have two lines:
source /custom/scripts/startup/startup;
echo 'Custom Files Loaded';
I have also tried the following for the first line:
sudo sh /custom/scripts/startup/startup.sh;
sudo sh /custom/scripts/startup/startup.sh;
sh /custom/scripts/startup/startup.sh;
In the startup file, I have one line:
source /custom/alias/custom_alias;
In the custom_alias, I have the following:
alias connect="sudo iwconfig eth1 {appropriate network config}";
alias turnOff="sudo shutdown now;";
alias restart="sudo shutdown -r now;";
When I first boot bt4, before I start the GUI (command startx); before the login prompt I see the message from the callStartup file: Custom Files Loaded. However, when I do alias, none of my custom aliases show. If I do either of the following in the terminal it works fine:
source /custom/scripts/start/startup;
source /custom/scripts/alias/custom_alias;
I would appreciate any advice on what I am doing wrong. Thanks.