I'm new to OpenSolaris and have been trying to figure out exactly how to get
one of my own created scripts to run at boot. I wrote the following sample
(perl) script just to see if I could get it to work, with no luck:
----------------------------------------------------------------------------
#!/usr/bin/perl
while(true) {
open(FILE, ">>file.txt");
print FILE "This is a test script.\n";
close(FILE);
sleep(300);
}
-----------------------------------------------------------------------------
The method I tried was:
- Naming the script "myscript", and placing it in the /etc/init.d directory
- using "chmod +x myscript" to make it an executable
- creating a symbolic link with ln -s to the /etc/rc2.d and /etc/rc3.d
directories each with the name S50myscript
I have searched exhaustively and can't seem to find a way to make this script
run at boot. Can anyone help?
--
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code