Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31517 - New initscript has syntax errors
Summary: New initscript has syntax errors
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Chuck Short (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-19 10:14 UTC by Christian Birchinger (RETIRED)
Modified: 2003-10-20 07:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Birchinger (RETIRED) gentoo-dev 2003-10-19 10:14:35 UTC
start-stop-daemon was removed and vtund started directly but the "--" is still
there. "--" means "end of arguments" but the init script has arguments after the
"--" sign. This means "-s" (server mode) is interpreted as non-option and vtund
thinks it's a hostname which results in following error:

 * Starting vtund server...
vtund[18410]: Host -s not found in /etc/vtund.conf                             
              [ !! ]


Reproducible: Always
Steps to Reproduce:
1. emerge vtun 2.6
2. configure vtun as server
3. run the init script

Actual Results:  
 * Starting vtund server...
vtund[18410]: Host -s not found in /etc/vtund.conf                             
              [ !! ]


Expected Results:  
Normal start.

When not using start-stop-daemon anymore the "--" should be used different or
droped at all. If still used then NOT before all args like "-s" are defined.
maybe something like:

/usr/sbin/vtund -s -P $server -- $args
Comment 1 Chuck Short (RETIRED) gentoo-dev 2003-10-19 12:34:46 UTC
Fixed in cvs.
Comment 2 Christian Birchinger (RETIRED) gentoo-dev 2003-10-20 00:28:17 UTC
I've tried the the initscript in my client today. It also fails because of
"--"

I use the following line in  /etc/vtund-start.conf:

connection_name ip_of_server -p -P 5555

vtund ignores stuff like -P 5555 because of "--"

So "/usr/sbin/vtund -- $args $host $server" fails where
"/usr/sbin/vtund $args $host $server" would work.

I suggest removing the "--" part complettly or make 100% sure that no optiones
are possible after the "--" string. Wild guess would be the "--" *after*
$args.
Comment 3 Christian Birchinger (RETIRED) gentoo-dev 2003-10-20 00:38:34 UTC
I guess the most standard compilant version would be:

Server:
/usr/sbin/vtund -s -P $server -- $args           
Client:
/usr/sbin/vtund $args -- $host $server

(All arguments before "--" and the rest after)
Comment 4 Christian Birchinger (RETIRED) gentoo-dev 2003-10-20 00:41:54 UTC
Argh sorry ... no -- in the server part at all since arguments are allowed
in the 3rd collum. So it's better this way:

Server:
/usr/sbin/vtund -s -P $server $args
Client:
/usr/sbin/vtund $args -- $host $server
Comment 5 Chuck Short (RETIRED) gentoo-dev 2003-10-20 04:21:30 UTC
Please test.
Comment 6 Christian Birchinger (RETIRED) gentoo-dev 2003-10-20 07:04:17 UTC
Since vtun.rc is now exactly the way i changed it localy it should work on
both client and server.