Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Error when running vsftpd in standalone mode.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
requiem
n00b
n00b


Joined: 07 Sep 2003
Posts: 23

PostPosted: Wed Sep 17, 2003 5:02 am    Post subject: Error when running vsftpd in standalone mode. Reply with quote

Hi,

Just a question concerning vsftpd. I have just configured it to start on boot and I am getting this error:

/sbin/runscript.sh: line 21: Network: command not found
* Starting vsftpd... [ ok ]

Thought this was a bit of an odd error. I tracked it down to this line in runscript.sh:

myservice="$(readlink "$1")"

Can anyone work out what is going on or need any further details? I can post my vsftpd config if you think it will help, although I don't think it is related to that.

Cheers,
Req.
Back to top
View user's profile Send private message
devon
l33t
l33t


Joined: 23 Jun 2003
Posts: 943

PostPosted: Wed Sep 17, 2003 7:29 am    Post subject: Reply with quote

Did you write your own script to start vsftpd? Can you post it here?
Back to top
View user's profile Send private message
requiem
n00b
n00b


Joined: 07 Sep 2003
Posts: 23

PostPosted: Wed Sep 17, 2003 7:50 am    Post subject: Reply with quote

Nope did not. I was reading through the bug tracker and found this:

Bug concerning standalone scripts missing for vsftpd.

Seems that these scripts are only new, hence this may be where the problem lies. From what I can gather the script "/sbin/runscript.sh" is called by the interpretter "/sbin/runscript". I am just not sure what is passed by "/sbin/runscript" and thus can't work out why the line:

myservice="$(readlink "$1")"

persists in giving me an error. Any help would be appreciated.

Cheers,
Req.

PS: If anyone wants to load vsftpd standalone I think updating from the latest source should give you all the required scripts.
Back to top
View user's profile Send private message
devon
l33t
l33t


Joined: 23 Jun 2003
Posts: 943

PostPosted: Wed Sep 17, 2003 8:01 am    Post subject: Reply with quote

What version of vsftpd are you using?
Code:
$ emerge -pv vsftpd

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] net-ftp/vsftpd-1.2.0-r1  +pam +tcpd -ipv6

I looked through the /etc/init.d/vsftpd script and didn't see anything obvious. I did see that it appears the vsftpd script does use /sbin/runscript.
Code:
 $ file /etc/init.d/vsftpd
/etc/init.d/vsftpd: a /sbin/runscript script text executable
Back to top
View user's profile Send private message
requiem
n00b
n00b


Joined: 07 Sep 2003
Posts: 23

PostPosted: Wed Sep 17, 2003 8:23 am    Post subject: Reply with quote

Here is the output from those two commands. I am sure that this is the latest vsftpd as of this afternoon.

Code:

# emerge -pv vsftpd

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] net-ftp/vsftpd-1.2.0-r1  +pam +tcpd -ipv6


Code:

# file /etc/init.d/vsftpd
/etc/init.d/vsftpd: a /sbin/runscript script text executable



I have tried some additional testing by adding the code to runscript.sh as follows:

Code:

echo $1
myscript="$1"
if [ -L "$1" -a ! -L "/etc/init.d/${1##*/}" ]
then
        myservice="$(readlink "$1")"
else
        myservice="$1"
fi
echo $1


Which yeilds the results:

Code:

# /etc/init.d/vsftpd restart
/etc/init.d/vsftpd
/etc/init.d/vsftpd
 * Stopping vsftpd... [ ok ]
/sbin/runscript.sh: line 21: Network: command not found
 * Starting vsftpd... [ ok ]


Thus I think that the $1 may be passed correctly when stop is called, but incorrectly when start is called.

Cheers
Req.
Back to top
View user's profile Send private message
LJ
Apprentice
Apprentice


Joined: 27 Dec 2002
Posts: 156

PostPosted: Sun Oct 05, 2003 8:42 am    Post subject: Reply with quote

[edit: whoops, wrong thread]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum