This commit is contained in:
parent
73f7c9f223
commit
df80b87a4c
@ -1,260 +0,0 @@
|
||||
--- COPYING
|
||||
+++ COPYING 2008-01-07 15:43:31.885812000 +0100
|
||||
@@ -2,7 +2,7 @@
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@@ -304,8 +304,9 @@ the "copyright" line and a pointer to wh
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
- along with this program; if not, write to the Free Software
|
||||
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+ along with this program; if not, write to the
|
||||
+ Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||
+ MA 02110-1301, USA.
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
--- makeboot.c
|
||||
+++ makeboot.c 2007-10-31 18:42:03.145266000 +0100
|
||||
@@ -339,6 +339,10 @@ struct makenode *pickup_task(void)
|
||||
best = node;
|
||||
}
|
||||
}
|
||||
+ if (best) {
|
||||
+ blogger("service %s", best->name);
|
||||
+ best->status = T_RUNNING;
|
||||
+ }
|
||||
return best;
|
||||
}
|
||||
|
||||
@@ -412,3 +416,36 @@ void dump_status(void)
|
||||
node->name, node->status, node->num_deps, node->interactive, node->importance);
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+#ifdef TEST
|
||||
+void *xcalloc(size_t nmemb, size_t size)
|
||||
+{
|
||||
+ void *r;
|
||||
+ if ((r = (void *)calloc(nmemb, size)) == 0) {
|
||||
+ fprintf(stderr, "calloc: out of memory\n");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ struct makenode *nodevec;
|
||||
+ char makefile[64];
|
||||
+
|
||||
+ if (argc != 2)
|
||||
+ goto out;
|
||||
+ nodevec = xcalloc(1, sizeof(*nodevec));
|
||||
+
|
||||
+ snprintf(makefile, sizeof(makefile), "depend.%s", argv[1]);
|
||||
+ parse_makefile(makefile);
|
||||
+ check_run_files(argv[1], "5", "6");
|
||||
+out:
|
||||
+ while ((nodevec = pickup_task())) {
|
||||
+ fprintf(stdout, "%s\n", nodevec->name);
|
||||
+ finish_task(nodevec);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
--- proc.c
|
||||
+++ proc.c 2008-01-07 15:43:31.809803000 +0100
|
||||
@@ -13,8 +13,8 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program (see the file COPYING); if not, write to the
|
||||
- * Free Software Foundation, Inc.,
|
||||
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||
+ * MA 02110-1301, USA.
|
||||
*
|
||||
****************************************************************
|
||||
*/
|
||||
@@ -69,6 +69,7 @@ int read_proc(unsigned long int * const
|
||||
}
|
||||
fclose(stat);
|
||||
|
||||
+ /* These fields are not present in /proc/stat for 2.4 kernels */
|
||||
running = scan_one(StatBuf, "procs_running");
|
||||
blocked = scan_one(StatBuf, "procs_blocked");
|
||||
|
||||
--- proc.h
|
||||
+++ proc.h 2008-01-07 15:43:31.913816000 +0100
|
||||
@@ -12,8 +12,8 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program (see the file COPYING); if not, write to the
|
||||
- * Free Software Foundation, Inc.,
|
||||
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||
+ * MA 02110-1301, USA.
|
||||
*
|
||||
****************************************************************
|
||||
*/
|
||||
--- startpar.8
|
||||
+++ startpar.8 2008-01-07 15:43:31.845807000 +0100
|
||||
@@ -85,11 +85,11 @@ like behaviour. This option takes three
|
||||
.IR boot ", " start ", and " stop
|
||||
for reading
|
||||
.IR .depend.boot " or " .depend.start " or " .depend.stop
|
||||
-repectivly in the directory
|
||||
+respectively in the directory
|
||||
.IR /etc/init.d/ .
|
||||
By scanning the boot and runlevel directories in
|
||||
.I /etc/init.d/
|
||||
-it then executes the appropiate scripts in parallel.
|
||||
+it then executes the appropriate scripts in parallel.
|
||||
|
||||
.SH FILES
|
||||
.I /etc/init.d/.depend.boot
|
||||
@@ -101,7 +101,7 @@ it then executes the appropiate scripts
|
||||
.SH SEE ALSO
|
||||
.BR init.d (7),
|
||||
.BR insserv (8),
|
||||
-.BR startproc (8)
|
||||
+.BR startproc (8).
|
||||
|
||||
.SH COPYRIGHT
|
||||
2003,2004 SuSE Linux AG, Nuernberg, Germany.
|
||||
--- startpar.c
|
||||
+++ startpar.c 2008-06-17 15:01:28.643966080 +0200
|
||||
@@ -12,8 +12,8 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program (see the file COPYING); if not, write to the
|
||||
- * Free Software Foundation, Inc.,
|
||||
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||
+ * MA 02110-1301, USA.
|
||||
*
|
||||
****************************************************************
|
||||
*/
|
||||
@@ -48,7 +48,7 @@ static long int numcpu = -1;
|
||||
static char *myname;
|
||||
static struct termios tio;
|
||||
static struct winsize wz;
|
||||
-static int wzok;
|
||||
+static sig_atomic_t wzok;
|
||||
static char *arg;
|
||||
static struct sigaction sa;
|
||||
static struct timeval glastio;
|
||||
@@ -72,7 +72,7 @@ struct prg {
|
||||
static struct prg *prgs;
|
||||
static int inpar, par;
|
||||
static int pidpipe[2];
|
||||
-static int iorate = 800;
|
||||
+static double iorate = 800.0;
|
||||
|
||||
void *xcalloc(size_t nmemb, size_t size)
|
||||
{
|
||||
@@ -240,8 +240,8 @@ static int checksystem(const int par, co
|
||||
if (read_proc(&prcs_run, &prcs_blked))
|
||||
return par;
|
||||
|
||||
- newpar = (par*numcpu) - prcs_run + 1; /* +1 for startpar its self */
|
||||
- newpar -= (prcs_blked * iorate); /* I/O load reduction */
|
||||
+ newpar = (par*numcpu) - prcs_run + 1; /* +1 for startpar its self */
|
||||
+ newpar -= (int)(((double)prcs_blked)*iorate); /* I/O load reduction */
|
||||
|
||||
#if DEBUG
|
||||
fprintf(stderr, "checksystem par=%d newpar=%d (prcs_run=%u) %ld\n", par, newpar, prcs_run, time(0));
|
||||
@@ -318,7 +318,7 @@ void run(struct prg *p)
|
||||
tio.c_oflag &= ~OPOST;
|
||||
if (tcsetattr(1, TCSANOW, &tio))
|
||||
perror("tcsetattr");
|
||||
- if (wzok && ioctl(0, TIOCSWINSZ, &wz))
|
||||
+ if (wzok && ioctl(1, TIOCSWINSZ, &wz))
|
||||
perror("TIOCSWINSZ");
|
||||
}
|
||||
else
|
||||
@@ -490,12 +490,23 @@ void detach(struct prg *p, const int sto
|
||||
p->fd = 0;
|
||||
}
|
||||
|
||||
-void sigchld(int sig __attribute__ ((unused)))
|
||||
+static void sigchld(int sig __attribute__ ((unused)))
|
||||
{
|
||||
char c = 0;
|
||||
write(pidpipe[1], &c, 1);
|
||||
}
|
||||
|
||||
+static void sigwinch(int sig __attribute__ ((unused)))
|
||||
+{
|
||||
+ if (ioctl(0, TIOCGWINSZ, &wz) < 0)
|
||||
+ {
|
||||
+ wzok = 0;
|
||||
+ return;
|
||||
+ }
|
||||
+ if (wz.ws_row == 0) wz.ws_row = 24;
|
||||
+ if (wz.ws_col == 0) wz.ws_col = 80;
|
||||
+}
|
||||
+
|
||||
void usage(int status)
|
||||
{
|
||||
fprintf(stderr, "usage: startpar [options] [-a arg] prgs\n");
|
||||
@@ -573,9 +584,9 @@ int main(int argc, char **argv)
|
||||
usage(0);
|
||||
break;
|
||||
case 'i':
|
||||
- iorate = atoi(optarg);
|
||||
- if (iorate <= 0)
|
||||
- iorate = 800;
|
||||
+ iorate = atof(optarg);
|
||||
+ if (iorate < 0.0)
|
||||
+ iorate = 800.0;
|
||||
break;
|
||||
default:
|
||||
usage(1);
|
||||
@@ -691,6 +702,15 @@ int main(int argc, char **argv)
|
||||
if (!gtimo_buf)
|
||||
gtimo_bufsize = 0; /* Accept error due memory shortage */
|
||||
|
||||
+ sa.sa_handler = sigwinch;
|
||||
+ sa.sa_flags = SA_RESTART|SA_NODEFER;
|
||||
+ (void)sigemptyset(&sa.sa_mask);
|
||||
+ if (sigaction(SIGWINCH, &sa, 0))
|
||||
+ {
|
||||
+ perror("sigwinch sigaction");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
if (tcgetattr(0, &tio))
|
||||
{
|
||||
perror("tcgetattr");
|
||||
@@ -698,6 +718,8 @@ int main(int argc, char **argv)
|
||||
}
|
||||
if (ioctl(0, TIOCGWINSZ, &wz) == 0)
|
||||
wzok = 1;
|
||||
+ if (wz.ws_row == 0) wz.ws_row = 24;
|
||||
+ if (wz.ws_col == 0) wz.ws_col = 80;
|
||||
|
||||
if (pipe(pidpipe))
|
||||
{
|
||||
@@ -1036,9 +1058,13 @@ int main(int argc, char **argv)
|
||||
exit (1);
|
||||
}
|
||||
#endif
|
||||
+#if VERBOSE
|
||||
printf(i ? " %d" : "%d", resvec[i]);
|
||||
+#endif /* VERBOSE */
|
||||
}
|
||||
+#if VERBOSE
|
||||
printf("\n");
|
||||
+#endif /* VERBOSE */
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7fccfb74b97efa4c364192ea13b3c07172449933b597ae9e08b911488eae525f
|
||||
size 16938
|
3
startpar-0.52.tar.bz2
Normal file
3
startpar-0.52.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:926ec61c624f18f27b3d4c03ba3bb19ee83fc6387986e1f6e3f966d76feb39bd
|
||||
size 17560
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 18 17:15:48 CEST 2008 - werner@suse.de
|
||||
|
||||
- Make a new startpar version 0.52
|
||||
* Should know about .depend.halt of new insserv
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 4 16:03:15 CEST 2008 - werner@suse.de
|
||||
|
||||
- Fix a long standing bug in startpar introduced by implementing
|
||||
the make like behaviour (bnc#394926)
|
||||
- Make a new startpar version 0.51
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 13 13:41:43 CEST 2008 - werner@suse.de
|
||||
|
||||
|
@ -17,20 +17,20 @@ Name: sysvinit
|
||||
%define KPVER 2.13
|
||||
%define SCVER 1.09
|
||||
%define SIVER 2.86
|
||||
%define START 0.50
|
||||
%define START 0.52
|
||||
License: GPL v2 or later
|
||||
Group: System/Base
|
||||
PreReq: coreutils
|
||||
AutoReqProv: on
|
||||
Version: 2.86
|
||||
Release: 150
|
||||
Release: 154
|
||||
Summary: SysV-Style init
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Source: sysvinit-2.86.tar.bz2
|
||||
Source2: killproc-2.13.tar.bz2
|
||||
Source3: powerd-2.0.2.tar.bz2
|
||||
Source4: showconsole-1.09.tar.bz2
|
||||
Source5: startpar-0.50.tar.bz2
|
||||
Source5: startpar-0.52.tar.bz2
|
||||
Source6: rc.powerd
|
||||
Source7: sysvinit-rpmlintrc
|
||||
Patch: sysvinit-2.86.dif
|
||||
@ -46,7 +46,7 @@ Patch10: showconsole-1.09.dif
|
||||
Patch11: sysvinit-2.86-race.patch
|
||||
Patch12: sysvinit-2.86-lib64.patch
|
||||
Patch13: sysvinit-2.82-multiline.patch
|
||||
Patch14: startpar-0.50.dif
|
||||
#Patch14: startpar-0.52.dif
|
||||
Patch15: sysvinit-2.86-usage-message.patch
|
||||
Patch16: sysvinit-2.86-full-time.patch
|
||||
Patch17: sysvinit-2.86-hddown.patch
|
||||
@ -94,7 +94,7 @@ pushd ../showconsole-%{SCVER}
|
||||
%patch -P 10
|
||||
popd
|
||||
pushd ../startpar-%{START}
|
||||
%patch -P 14
|
||||
#%patch -P 14
|
||||
popd
|
||||
%_fixowner .
|
||||
%_fixgroup .
|
||||
@ -285,6 +285,13 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%doc %{_mandir}/man8/startpar.8.gz
|
||||
|
||||
%changelog
|
||||
* Fri Jul 18 2008 werner@suse.de
|
||||
- Make a new startpar version 0.52
|
||||
* Should know about .depend.halt of new insserv
|
||||
* Fri Jul 04 2008 werner@suse.de
|
||||
- Fix a long standing bug in startpar introduced by implementing
|
||||
the make like behaviour (bnc#394926)
|
||||
- Make a new startpar version 0.51
|
||||
* Fri Jun 13 2008 werner@suse.de
|
||||
- Let blogd detect changes of screen size, set new size pty pair,
|
||||
and if process group is not init send a SIGWINCH (bnc#259577)
|
||||
|
Loading…
Reference in New Issue
Block a user