Compare commits
13 Commits
bd55f5e243
...
38ddf2aece
Author | SHA1 | Date | |
---|---|---|---|
|
38ddf2aece | ||
|
3401b62142 | ||
|
5e82478a24 | ||
|
4a4228b1b7 | ||
|
c06458e1c1 | ||
|
93da64d133 | ||
|
e7f4361bde | ||
|
b6aacf3b68 | ||
|
b70b2776ed | ||
|
86c5d7b93c | ||
|
e7cf1f2b94 | ||
|
82c2a211fa | ||
|
e8cc829689 |
@ -1,6 +1,16 @@
|
||||
sysvinit (3.07) released; urgency=low
|
||||
* Fixed killall5 so that processes in the omit list are
|
||||
not sent any signals, including SIGSTOP.
|
||||
* Fixed usage message for killall5 to be more accurate.
|
||||
* pidof was not returning PIDs of programs which were launched
|
||||
using a symbolic link. (ie /tmp/sleep when /tmp/sleep links to /usr/bin/sleep).
|
||||
This is now fixed as we check both the realpath and symbolic path for processes.
|
||||
In other words, "pidof /tmp/sleep" and "pidof /usr/bin/sleep" will return
|
||||
the same PIDs when /tmp/sleep is a symbolic link to /usr/bin/sleep.
|
||||
* Fixed memory initialization error in pidof. Fix provided by Markus Fischer.
|
||||
* Accepted patch from Mark Hindley which avoids clearing realpath information
|
||||
in pidof when trying to find matching executables.
|
||||
|
||||
|
||||
sysvinit (3.06) released; urgency=low
|
||||
* Mark Hindley fixed typo in es.po
|
||||
|
497
man/po/de.po
497
man/po/de.po
File diff suppressed because it is too large
Load Diff
4638
man/po/pt.po
Normal file
4638
man/po/pt.po
Normal file
File diff suppressed because it is too large
Load Diff
37
src/Makefile
37
src/Makefile
@ -60,6 +60,16 @@ MAN8 += sulogin.8
|
||||
MANDB :=
|
||||
endif
|
||||
|
||||
ifeq ($(DISTRO),Void)
|
||||
BIN = fstab-decode halt init killall5 readbootlog runlevel shutdown
|
||||
SBIN =
|
||||
USRBIN =
|
||||
MAN1 = readbootlog.1
|
||||
MAN5 = initscript.5 inittab.5 initctl.5
|
||||
MAN8 = halt.8 init.8 killall5.8 poweroff.8 reboot.8 runlevel.8 shutdown.8
|
||||
MAN8 += telinit.8 fstab-decode.8
|
||||
endif
|
||||
|
||||
ifeq ($(MNTPOINT),yes)
|
||||
BIN += mountpoint
|
||||
MAN1 += mountpoint.1
|
||||
@ -79,8 +89,8 @@ else
|
||||
INSTALL_EXEC = install -m 755
|
||||
INSTALL_DATA = install -m 644
|
||||
endif
|
||||
INSTALL_DIR = install -m 755 -d
|
||||
MANDIR = /usr/share/man
|
||||
INSTALL_DIR = true
|
||||
MANDIR = /share/man
|
||||
|
||||
ifeq ($(WITH_SELINUX),yes)
|
||||
SELINUX_DEF = -DWITH_SELINUX
|
||||
@ -210,27 +220,14 @@ install: all
|
||||
# $(INSTALL_DIR) $(ROOT)/etc/
|
||||
$(INSTALL_DIR) $(ROOT)/etc/inittab.d
|
||||
# $(INSTALL_EXEC) ../doc/initscript.sample $(ROOT)/etc/
|
||||
ln -sf halt $(ROOT)/sbin/reboot
|
||||
ln -sf halt $(ROOT)/sbin/poweroff
|
||||
ln -sf init $(ROOT)/sbin/telinit
|
||||
ln -sf ../sbin/killall5 $(ROOT)/bin/pidof
|
||||
if [ ! -f $(ROOT)/usr/bin/lastb ]; then \
|
||||
ln -sf last $(ROOT)/usr/bin/lastb; \
|
||||
fi
|
||||
$(INSTALL_DIR) $(ROOT)/usr/include/
|
||||
$(INSTALL_DATA) initreq.h $(ROOT)/usr/include/
|
||||
ln -sf halt $(ROOT)/bin/reboot
|
||||
ln -sf halt $(ROOT)/bin/poweroff
|
||||
ln -sf init $(ROOT)/bin/telinit
|
||||
$(INSTALL_DIR) $(ROOT)/include/
|
||||
$(INSTALL_DATA) initreq.h $(ROOT)/include/
|
||||
for man in $(MANPAGES) ; do \
|
||||
targetdir=$(ROOT)$(MANDIR)/$$(dirname $$man)/man$${man##*.}; \
|
||||
$(INSTALL_DIR) $$targetdir; \
|
||||
$(INSTALL_DATA) ../man/$$man $$targetdir/$$(basename $$man); \
|
||||
sed -i "1{ $(MANDB); }" $$targetdir/$$(basename $$man); \
|
||||
done
|
||||
ifeq ($(ROOT),)
|
||||
#
|
||||
# This part is skipped on Debian systems, the
|
||||
# debian.preinst script takes care of it.
|
||||
@if [ ! -p /run/initctl ]; then \
|
||||
echo "Creating /run/initctl"; \
|
||||
rm -f /run/initctl; \
|
||||
mknod -m 600 /run/initctl p; fi
|
||||
endif
|
||||
|
@ -662,6 +662,7 @@ int readproc()
|
||||
/* Try to stat the executable. */
|
||||
snprintf(path, sizeof(path), "/proc/%s/exe", d->d_name);
|
||||
p->pathname = (char *)xmalloc(PATH_MAX);
|
||||
memset(p->pathname, 0, PATH_MAX);
|
||||
if (readlink(path, p->pathname, PATH_MAX) == -1) {
|
||||
p->pathname = NULL;
|
||||
}
|
||||
@ -739,8 +740,8 @@ PIDQ_HEAD *pidof(char *prog)
|
||||
return NULL;
|
||||
|
||||
/* Try to stat the executable. */
|
||||
memset(real_path, 0, sizeof(real_path));
|
||||
if ( (prog[0] == '/') && ( realpath(prog, real_path) ) ) {
|
||||
memset(&real_path[0], 0, sizeof(real_path));
|
||||
dostat++;
|
||||
}
|
||||
|
||||
@ -763,6 +764,11 @@ PIDQ_HEAD *pidof(char *prog)
|
||||
add_pid_to_q(q, p);
|
||||
foundone++;
|
||||
}
|
||||
else if ( (p->argv0) && (! strcmp(p->argv0, prog) ) )
|
||||
{
|
||||
add_pid_to_q(q, p);
|
||||
foundone++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -826,6 +832,7 @@ PIDQ_HEAD *pidof(char *prog)
|
||||
* as was done in earlier versions of this program, since this
|
||||
* allows /aaa/foo to match /bbb/foo .
|
||||
*/
|
||||
|
||||
ok |=
|
||||
(p->argv0 && strcmp(p->argv0, prog) == 0)
|
||||
|| (p->argv0 && s != prog && strcmp(p->argv0, s) == 0)
|
||||
@ -873,7 +880,7 @@ PIDQ_HEAD *pidof(char *prog)
|
||||
/* Give usage message and exit. */
|
||||
void usage(void)
|
||||
{
|
||||
nsyslog(LOG_ERR, "only one argument, a signal number, allowed");
|
||||
nsyslog(LOG_ERR, "usage: killall5 -signum [-o omitpid] [-o omitpid] ...");
|
||||
closelog();
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user