how to Implicitly execute some unix commands during/after Solaris reboot


 
Thread Tools Search this Thread
Operating Systems Solaris how to Implicitly execute some unix commands during/after Solaris reboot
# 1  
Old 04-02-2009
Question how to Implicitly execute some unix commands during/after Solaris reboot

I have to execute 2 commands everytime i reboot my Solaris machine.
Simple "share" and "chown" commands.

Is there anywhere (maybe a config file or something) where I can include these commands so that I do not have to manually run them everytime I reboot the machine?

Any help appreciated
ThanksSmilie
# 2  
Old 04-02-2009
Quote:
Originally Posted by lydiaEd
I have to execute 2 commands everytime i reboot my Solaris machine.
Simple "share" and "chown" commands.

Is there anywhere (maybe a config file or something) where I can include these commands so that I do not have to manually run them everytime I reboot the machine?

Any help appreciated
ThanksSmilie
Try putting them in your .profile
# 3  
Old 04-02-2009
the .profile is only executed during login, not on boot. i think the better way is a runlevel script. have a look at the files in "/etc/init.d" and "/etc/rcX.d".
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Create a GUI from where in we can execute unix commands

Hello Experts, In my current job I need to upgrade a web GUI to execute Unix commands in a server....I am completely new to programming--So can anyone here help me out with initial steps... Please notice that statement completely new to programming means-I never did it, SO I might keep on coming... (1 Reply)
Discussion started by: mhadi
1 Replies

2. Solaris

How can I output all previous Unix commands in Solaris to a file??

Hello friends: I login to solaris with a username/Password and I can see quite a lot of previous I use dbefore, it accumulates a lot, I hope to output them into a Command.txt file as reference, not copy/paste 1 by 1, is there any way I can collect all commands in batch then put into a file, ... (3 Replies)
Discussion started by: sunnysunnysunny
3 Replies

3. UNIX for Dummies Questions & Answers

commands to execute unix script

commands to execute unix script (1 Reply)
Discussion started by: sunilamarnadh
1 Replies

4. Shell Programming and Scripting

Command to execute commands one after other

I am writng a script in which there is an installation file.The installer runs good. But after the installer command there are some files and commands which are based on those installed files. Now problem is the commands get executed before the installer is totally installed. So is there any... (5 Replies)
Discussion started by: sriki32
5 Replies

5. UNIX for Advanced & Expert Users

How to execute multiple unix commands in one session from java

Hi, Iam trying to code in java and wanted to run the commands in the Unix remote servers. I have the following code to run multiple GREP commands in a single session. But when i execute this, the first command executes successfully, whereas from the next line it says "Exception Occured... (1 Reply)
Discussion started by: gravi2020
1 Replies

6. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

7. Solaris

Unable to execute commands using rsh in Solaris 9 and 10.

Unable to execute commands using rsh in Solaris 9 and 10. When I execute this command " rsh -n 172.16.67.91 ls -l " I am getting this error message. ::ffff:172.16.67.91: Connection refused Please guide me how to enable rsh. Thanks & Regards Durgaprasad (1 Reply)
Discussion started by: durgaprasadr13
1 Replies

8. Shell Programming and Scripting

implicitly redirecting stdout to a file

Is there a way to redirect all stdout to a file implicitly - like defining stdout=/home/me/process.log - so that all "echo" commands in several scripts/subscripts are written to that file; instead of having to edit all scripts to redirect the "echo" (e.g. echo 'This is a test ' >>... (1 Reply)
Discussion started by: ALTRUNVRSOFLN
1 Replies

9. Solaris

Sun solaris unix commands

hi friends, I am working in Sun solaris unix 10 with shell commands and all these works properly. Then i created a small function which includes these commands. Now the problem arises. When the commands are run by calling this fuction.it shows error. Why i am not able to run the unix... (1 Reply)
Discussion started by: gjithin
1 Replies

10. UNIX for Dummies Questions & Answers

Can Unix (Solaris) execute a dos .bat script?

I did a search and found lots of questions/comments about how a dos script could execute Unix but not the other way round. If it's possible, I'd like the link to a post/site that would show me the way. Thanks. (4 Replies)
Discussion started by: BCarlson
4 Replies
Login or Register to Ask a Question