Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jul 2000 12:14:21 -0400 (EDT)
From:      William Melanson <wjm@gate.net>
To:        =?iso-8859-1?q?Dan=20Fairs?= <danfairs@yahoo.co.uk>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Shell Script Execution
Message-ID:  <Pine.A41.4.21.0007281210140.517290-100000@tiwa.gate.net>
In-Reply-To: <20000727202720.27708.qmail@web3206.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 27 Jul 2000, [iso-8859-1] Dan Fairs wrote:

% Date: Thu, 27 Jul 2000 21:27:20 +0100 (BST)
% From: "[iso-8859-1] Dan Fairs" <danfairs@yahoo.co.uk>
% To: freebsd-questions@FreeBSD.ORG
% Subject: Shell Script Execution
% 
% Hi all,
% 
% This is a silly little problem, but I can't figure out what's going on.
% I'm setting up qmail (incidentally) and have created the startup
% script. On trying to execute it, this happens:
% 
% [root@bonsai rc.d]$ ./qmail.sh cdb
% bash: ./qmail.sh: No such file or directory
% [root@bonsai rc.d]$ ls -l qmail.sh 
% -rwxr-xr--  1 root  wheel  2492 Jul 27 20:11 qmail.sh
% [root@bonsai rc.d]$ whoami
% root
% [root@bonsai rc.d]$ file qmail.sh 
% qmail.sh: Bourne shell script text
% [root@bonsai rc.d]$ head qmail.sh 
% #!/bin/sh
% 
% PATH=/var/qmail/bin:/usr/local/bin:/usr/bin:/bin
% export PATH
% 
% case "$1" in
%   start)
%     echo -n "Starting qmail: svscan"
%     cd /var/qmail/supervise
%     env - PATH="$PATH" svscan &
% [root@bonsai rc.d]$ which sh
% /bin/sh
% [root@bonsai rc.d]$ 
% 
% 
% 
% So why am I getting that "No such file..." error? Everything seems to
% be there, with permissions set... It's clearly something obvious that
% I'm missing.
% 
% Help much appreciated.
% 
% Regards, 
% Dan
% 
% 

Dan,

Try executing this script in a troubleshooting mode whereas you can see
each operation within the actual script being printed to
standard-output. If there is an path/syntax error within this script it'll
surely be pointed towards.

[root@bonsai rc.d]$ sh -x ./qmail.sh cdb  

./bill

--------------------------------oOo------------------------------------
  William  J. Melanson        CyberGate, Inc. | e.spire Communications
  Sr Network Controller       www.gate.net ---- www.espire.net 
  Network Operations Center   Phone: (954) 334-8080
  finger wjm@gate.net         PGP public key
--------------------------------oOo------------------------------------



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.A41.4.21.0007281210140.517290-100000>