rc3.d - source: not found


 
Thread Tools Search this Thread
Operating Systems Solaris rc3.d - source: not found
# 8  
Old 03-11-2008
Can you double check "#!/bin/bash" is the first line of myService.sh ?
# 9  
Old 03-11-2008
yes it is
Code:
#!/bin/bash
set -x
source source /my/dir/myenv.sh

Result:
Quote:
$ /sbin/rc3
...
+ source source /my/dir/myenv.sh
/sbin/rc3: source: not found
...
As I said, if I replace "source" by "." it will source the file but then I run into other problems and I'd like to force the usage of bash instead of rewriting the whole source file into bourne shell.

Thanks,
Tex

Last edited by Tex-Twil; 03-11-2008 at 01:15 PM..
# 10  
Old 03-11-2008
There is an extra "source" command in that line.

Can you add this line after the "set -x" one:
ptree $$
and post its output.

What release of Solaris is this ?
# 11  
Old 03-11-2008
Quote:
Originally Posted by jlliagre
There is an extra "source" command in that line.
Oh sorry, it is just a copy/paste mistake.

Quote:
Originally Posted by jlliagre
Can you add this line after the "set -x" one:
ptree $$
and post its output.
What release of Solaris is this ?
I'll tell you tomorrow when I'm back to work. Thanks for assistance.
Tex
# 12  
Old 03-12-2008
Hello again,
Quote:
Originally Posted by jlliagre
Can you add this line after the "set -x" one:
ptree $$
and post its output.
Code:
+ ptree 12045
908   /usr/lib/ssh/sshd
  11912 /usr/lib/ssh/sshd
    11914 -sh              <-- my login shell but I go into bash just after login
      11920 bash          <-- this is the shell where I run the /sbin/rc3 from
        12045 /sbin/sh /sbin/rc3
          12158 ptree 12045


Quote:
Originally Posted by jlliagre
What release of Solaris is this ?
Code:
$cat /etc/release
                        Solaris 9 4/03 s9s_u3wos_08 SPARC
           Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 25 February 2003

I found a "dirty" solution which consist of having another "wrapper" script which launches my script in a bash:

Code:
#!/bin/bash
/etc/init.d/myService.sh $1

I'd prefer another solution but this one should do it till I find something else.

regards,
Tex
# 13  
Old 03-12-2008
I have no Solaris 9 available.

Can you post the block of lines after that one in the /etc/rc3 script:
Code:
for f in /etc/rc3.d/S*; do

# 14  
Old 03-12-2008
Code:
	for f in /etc/rc3.d/S*; do
		if [ -s $f ]; then
			case $f in
				*.sh)	.	 $f ;;
				*)	/sbin/sh $f start ;;
			esac
		fi
	done

Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. OS X (Apple)

[Solved] links2 --enable-graphics from source, configure error: no graphics driver found.

Howdy I am trying to install links2 with graphics support on snow leopard 10.6.8 (xcode installed). I have had the program running last year, also installed from source - but then I had installed some image libraries with mac ports and fink - cannot reproduce that setup. Plus I would like to not... (6 Replies)
Discussion started by: butterbaerchen
6 Replies

2. HP-UX

bash...Not found through where(compiling source file)

Hi i have compiled and installed bash 3.2 on my hp-ux parisc its in path /usr/local/pkg/bash/bin/bash .....When im search for this bash (through whereis bash) im not findind but other which i hve done in same procedure( gettext,m4) ..Im able to find through whereis search option can any1... (3 Replies)
Discussion started by: vasanthan
3 Replies

3. Debian

Kernel source not found. (can't install network card drivers)

I've had no luck with help on linuxquestions so I figured I'd try here. I'm using debian etch. The problem is that I can not install my network card because it says: Makefile:62: *** Linux kernel source not found. Stop. I have the kernel-headers installed. I've looked all over the... (9 Replies)
Discussion started by: Virtuality
9 Replies

4. Shell Programming and Scripting

how can i check in csh if command found or not found ?

hello all im trying to use in sun Solaris the information received from the top command now i several machines that dont have install the top program so when im running the script im geting error saying after im running this code : set MemoryInfo = `top | grep Memory` if (... (2 Replies)
Discussion started by: umen
2 Replies
Login or Register to Ask a Question