/[baselayout]/trunk/sbin/runscript.c
Gentoo

Contents of /trunk/sbin/runscript.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 162 - (show annotations) (download) (as text)
Fri Apr 5 23:21:25 2002 UTC (12 years, 3 months ago) by azarah
File MIME type: text/x-csrc
File size: 559 byte(s)
move rc-help.sh as well.

1 /*
2 * Copyright 1999-2002 Gentoo Technologies, Inc.
3 * Distributed under the terms of the GNU General Public License, v2 or later
4 * $Header$
5 */
6
7
8 #include <stdio.h>
9 #include <sys/types.h>
10 #include <wait.h>
11
12 int main(int argc, char **argv) {
13 pid_t pid;
14 char *myargs[32];
15 int new=1;
16 myargs[0]="runscript";
17 /* if ( argc < 3 )
18 exit(1);
19 */
20 while (argv[new]!=0) {
21 myargs[new]=argv[new];
22 new++;
23 }
24 myargs[new]=(char *) 0;
25 if ( argc < 3 ) {
26 execv("/sbin/rc-help.sh",myargs);
27 exit(1);
28 }
29 if (execv("/sbin/runscript.sh",myargs) < 0)
30 exit(1);
31 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20