Rename MINIX service(8) to minix-service(8)
IMPORTANT: this change has a docs/UPDATING entry! This rename is unfortunately necessary because NetBSD has decided to create its own service(8) utility, and we will want to import theirs as well. The two can obviously not coexist. Also move ours from /bin to /sbin, as it is a superuser-only utility. Change-Id: Ic6e46ffb3a84b4747d2fdcb0d74e62dbea065039
This commit is contained in:
parent
bf5536d653
commit
c58da9fbc3
@ -36,7 +36,7 @@
|
||||
./bin/mv minix-base
|
||||
./bin/netconf minix-base
|
||||
./bin/pax minix-base
|
||||
./bin/printconfig minix-base
|
||||
./bin/printconfig minix-base obsolete
|
||||
./bin/printroot minix-base
|
||||
./bin/ps minix-base
|
||||
./bin/pwd minix-base
|
||||
@ -46,7 +46,7 @@
|
||||
./bin/readclock minix-base
|
||||
./bin/rm minix-base
|
||||
./bin/rmdir minix-base
|
||||
./bin/service minix-base
|
||||
./bin/service minix-base obsolete
|
||||
./bin/setup minix-base
|
||||
./bin/sh minix-base
|
||||
./bin/sleep minix-base
|
||||
@ -185,6 +185,7 @@
|
||||
./sbin/fsck_mfs minix-base
|
||||
./sbin/halt minix-base
|
||||
./sbin/init minix-base
|
||||
./sbin/minix-service minix-base
|
||||
./sbin/mkfs.mfs minix-base
|
||||
./sbin/mknod minix-base
|
||||
./sbin/newfs_ext2fs minix-base
|
||||
@ -194,6 +195,7 @@
|
||||
./sbin/nologin minix-base
|
||||
./sbin/ping minix-base
|
||||
./sbin/poweroff minix-base
|
||||
./sbin/printconfig minix-base
|
||||
./sbin/reboot minix-base
|
||||
./sbin/shutdown minix-base
|
||||
./sbin/sysctl minix-base
|
||||
|
@ -134,7 +134,7 @@
|
||||
./usr/libdata/debug/bin/mount.debug minix-debug debug
|
||||
./usr/libdata/debug/bin/mv.debug minix-debug debug
|
||||
./usr/libdata/debug/bin/pax.debug minix-debug debug
|
||||
./usr/libdata/debug/bin/printconfig.debug minix-debug debug
|
||||
./usr/libdata/debug/bin/printconfig.debug minix-debug debug,obsolete
|
||||
./usr/libdata/debug/bin/printroot.debug minix-debug debug
|
||||
./usr/libdata/debug/bin/ps.debug minix-debug debug
|
||||
./usr/libdata/debug/bin/pwd.debug minix-debug debug
|
||||
@ -143,7 +143,7 @@
|
||||
./usr/libdata/debug/bin/readclock.debug minix-debug debug
|
||||
./usr/libdata/debug/bin/rm.debug minix-debug debug
|
||||
./usr/libdata/debug/bin/rmdir.debug minix-debug debug
|
||||
./usr/libdata/debug/bin/service.debug minix-debug debug
|
||||
./usr/libdata/debug/bin/service.debug minix-debug debug,obsolete
|
||||
./usr/libdata/debug/bin/sh.debug minix-debug debug
|
||||
./usr/libdata/debug/bin/sleep.debug minix-debug debug
|
||||
./usr/libdata/debug/bin/stty.debug minix-debug debug
|
||||
@ -161,12 +161,14 @@
|
||||
./usr/libdata/debug/sbin/fsck_ext2fs.debug minix-debug debug
|
||||
./usr/libdata/debug/sbin/fsck_mfs.debug minix-debug debug
|
||||
./usr/libdata/debug/sbin/init.debug minix-debug debug
|
||||
./usr/libdata/debug/sbin/minix-service.debug minix-debug debug
|
||||
./usr/libdata/debug/sbin/mknod.debug minix-debug debug
|
||||
./usr/libdata/debug/sbin/newfs_ext2fs.debug minix-debug debug
|
||||
./usr/libdata/debug/sbin/newfs_msdos.debug minix-debug debug
|
||||
./usr/libdata/debug/sbin/newfs_udf.debug minix-debug debug
|
||||
./usr/libdata/debug/sbin/newfs_v7fs.debug minix-debug debug
|
||||
./usr/libdata/debug/sbin/ping.debug minix-debug debug
|
||||
./usr/libdata/debug/sbin/printconfig.debug minix-debug debug
|
||||
./usr/libdata/debug/sbin/reboot.debug minix-debug debug
|
||||
./usr/libdata/debug/sbin/shutdown.debug minix-debug debug
|
||||
./usr/libdata/debug/sbin/sysctl.debug minix-debug debug
|
||||
|
@ -3405,6 +3405,7 @@
|
||||
./usr/man/man8/loadramdisk.8 minix-man
|
||||
./usr/man/man8/makefs.8 minix-man
|
||||
./usr/man/man8/makewhatis.8 minix-man
|
||||
./usr/man/man8/minix-service.8 minix-man
|
||||
./usr/man/man8/mknod.8 minix-man
|
||||
./usr/man/man8/mtree.8 minix-man
|
||||
./usr/man/man8/netconf.8 minix-man
|
||||
@ -3436,7 +3437,7 @@
|
||||
./usr/man/man8/rshd.8 minix-man
|
||||
./usr/man/man8/screendump.8 minix-man
|
||||
./usr/man/man8/serial-ip.8 minix-man obsolete
|
||||
./usr/man/man8/service.8 minix-man
|
||||
./usr/man/man8/service.8 minix-man obsolete
|
||||
./usr/man/man8/setup.8 minix-man
|
||||
./usr/man/man8/shutdown.8 minix-man
|
||||
./usr/man/man8/slip.8 minix-man
|
||||
|
@ -1,3 +1,18 @@
|
||||
20170222:
|
||||
Because of naming conflicts, the MINIX 3 service(8) utility has been
|
||||
renamed to "minix-service". After successfully rebuilding the system
|
||||
*and* rebooting (no earlier!), remove the old service utility:
|
||||
|
||||
# rm /bin/service
|
||||
|
||||
Better yet, use the postinstall(8) command to remove all files marked
|
||||
as obsolete. It is not a bad idea to do this every now and then:
|
||||
|
||||
# postinstall fix obsolete
|
||||
|
||||
..but only ever after the reboot! Either way, deleting the old service
|
||||
tool will avoid conflicts with the same-named NetBSD utility later on.
|
||||
|
||||
20170218:
|
||||
Before starting a build, you will have to update your master.passwd and
|
||||
group files in /etc. This is needed because we have switched over from
|
||||
|
10
etc/rc
10
etc/rc
@ -46,7 +46,7 @@ up()
|
||||
service=$1
|
||||
shift
|
||||
|
||||
service $opt up /service/$service "$@"
|
||||
minix-service $opt up /service/$service "$@"
|
||||
}
|
||||
|
||||
edit()
|
||||
@ -72,7 +72,7 @@ edit()
|
||||
if [ ! -x $binlocation ]
|
||||
then binlocation=/sbin/$service
|
||||
fi
|
||||
service $opt edit $binlocation -label $service "$@"
|
||||
minix-service $opt edit $binlocation -label $service "$@"
|
||||
}
|
||||
|
||||
while getopts 'saf' opt
|
||||
@ -174,7 +174,7 @@ autoboot|start)
|
||||
rootline=`cat /etc/mtab | grep "on / "`
|
||||
rootfs=fs_`echo "$rootline" | cut -d' ' -f1 | cut -d'/' -f3`
|
||||
roottype=`echo "$rootline" | cut -d' ' -f5`
|
||||
service -c edit /service/$roottype -label $rootfs
|
||||
minix-service -c edit /service/$roottype -label $rootfs
|
||||
fi
|
||||
|
||||
if [ "$sflag" ]
|
||||
@ -224,11 +224,11 @@ down|stop)
|
||||
|
||||
if [ -x /service/usbd ]
|
||||
then
|
||||
service down usbd
|
||||
minix-service down usbd
|
||||
fi
|
||||
|
||||
# Tell RS server we're going down.
|
||||
service shutdown
|
||||
minix-service shutdown
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -4,17 +4,17 @@
|
||||
|
||||
# TSL2550 Ambient Light Sensor
|
||||
test -e /dev/tsl2550b3s39 || (cd /dev && MAKEDEV tsl2550b3s39)
|
||||
/bin/service up /service/tsl2550 -dev /dev/tsl2550b3s39 \
|
||||
/sbin/minix-service up /service/tsl2550 -dev /dev/tsl2550b3s39 \
|
||||
-label tsl2550.3.39 -args 'bus=3 address=0x39' && echo -n " tsl2550"
|
||||
|
||||
# SHT21 Temperature and Humidity Sensor
|
||||
test -e /dev/sht21b3s40 || (cd /dev && MAKEDEV sht21b3s40)
|
||||
/bin/service up /service/sht21 -dev /dev/sht21b3s40 \
|
||||
/sbin/minix-service up /service/sht21 -dev /dev/sht21b3s40 \
|
||||
-label sht21.3.40 -args 'bus=3 address=0x40' && echo -n " sht21"
|
||||
|
||||
# BMP085 Temperature and Pressure Sensor
|
||||
test -e /dev/bmp085b3s77 || (cd /dev && MAKEDEV bmp085b3s77)
|
||||
/bin/service up /service/bmp085 -dev /dev/bmp085b3s77 \
|
||||
/sbin/minix-service up /service/bmp085 -dev /dev/bmp085b3s77 \
|
||||
-label bmp085.3.77 -args 'bus=3 address=0x77' && echo -n " bmp085"
|
||||
|
||||
daemonize tcpd http /usr/share/beaglebone/weather/weatherstation.lua
|
||||
|
@ -57,7 +57,7 @@ echo "Arguments: $@"
|
||||
|
||||
restarts=$(grep restarts /proc/service/$1 |cut -d: -f2)
|
||||
restarts=$(( $restarts + 1 ))
|
||||
service down "$1"
|
||||
minix-service down "$1"
|
||||
kill_by_name dhcpd
|
||||
kill_by_name nonamed
|
||||
kill_by_name syslogd
|
||||
@ -66,10 +66,10 @@ kill_by_name syslogd
|
||||
sleep 3
|
||||
if [ X`/bin/sysenv lwip` = Xyes ]
|
||||
then
|
||||
service up /service/lwip -script /etc/rs.inet -dev /dev/ip -restarts $restarts
|
||||
minix-service up /service/lwip -script /etc/rs.inet -dev /dev/ip -restarts $restarts
|
||||
dhcpd --lwip &
|
||||
else
|
||||
service up /service/inet -script /etc/rs.inet -dev /dev/ip -restarts $restarts
|
||||
minix-service up /service/inet -script /etc/rs.inet -dev /dev/ip -restarts $restarts
|
||||
daemonize dhcpd
|
||||
fi
|
||||
daemonize nonamed -L
|
||||
|
@ -97,7 +97,7 @@ up()
|
||||
for dir in $SERVICES_DIRS
|
||||
do bin=$dir/$service
|
||||
if [ -x $bin -a -z "$found" ]
|
||||
then service $opt up $bin "$@"
|
||||
then minix-service $opt up $bin "$@"
|
||||
echo -n " $service"
|
||||
found=yes
|
||||
fi
|
||||
|
@ -15,13 +15,13 @@ SUBDIR= add_route arp at backup \
|
||||
intr irdpd isoread \
|
||||
loadkeys loadramdisk logger look lp \
|
||||
lpd lspci mail MAKEDEV \
|
||||
mount mt netconf \
|
||||
minix-service mount mt netconf \
|
||||
nonamed \
|
||||
prep printroot \
|
||||
profile progressbar pr_routes \
|
||||
ramdisk rarpd rawspeed readclock \
|
||||
remsync rget rlogin \
|
||||
rotate service setup \
|
||||
rotate setup \
|
||||
slip spell sprofalyze sprofdiff srccrc \
|
||||
svrctl swifi synctree sysenv \
|
||||
tcpd tcpdp tcpstat telnet \
|
||||
|
@ -9,12 +9,10 @@
|
||||
#include <assert.h>
|
||||
#include <signal.h>
|
||||
#include <minix/dmap.h>
|
||||
#include <minix/paths.h>
|
||||
#include "usb_driver.h"
|
||||
#include "proto.h"
|
||||
|
||||
#define SERVICE_BINARY "/bin/service"
|
||||
|
||||
|
||||
#define DEVMAN_TYPE_NAME "dev_type"
|
||||
#define PATH_LEN 256
|
||||
#define INVAL_MAJOR -1
|
||||
@ -166,8 +164,8 @@ int stop_driver(struct devmand_driver_instance *inst)
|
||||
assert(inst->label);
|
||||
|
||||
snprintf(cmdl, 1024, "%s down %s %d",
|
||||
SERVICE_BINARY, inst->label, inst->dev_id);
|
||||
dbg("executing service: \"%s\"", cmdl);
|
||||
_PATH_MINIX_SERVICE, inst->label, inst->dev_id);
|
||||
dbg("executing minix-service: \"%s\"", cmdl);
|
||||
ret = system(cmdl);
|
||||
if (ret != 0)
|
||||
{
|
||||
@ -201,9 +199,9 @@ int start_driver(struct devmand_driver_instance *inst)
|
||||
assert(inst->label);
|
||||
|
||||
snprintf(cmdl, 1024, "%s up %s -major %d -devid %d -label %s",
|
||||
SERVICE_BINARY, inst->drv->binary, inst->major, inst->dev_id,
|
||||
_PATH_MINIX_SERVICE, inst->drv->binary, inst->major, inst->dev_id,
|
||||
inst->label);
|
||||
dbg("executing service: \"%s\"", cmdl);
|
||||
dbg("executing minix-service: \"%s\"", cmdl);
|
||||
|
||||
ret = system(cmdl);
|
||||
|
||||
@ -739,7 +737,7 @@ static void usb_intf_add_event(char *path, int dev_id)
|
||||
drv_inst->dev_id = dev_id;
|
||||
|
||||
|
||||
/* start driver (invoke service) */
|
||||
/* start driver (invoke minix-service) */
|
||||
start_driver(drv_inst);
|
||||
|
||||
/*
|
||||
|
10
minix/commands/minix-service/Makefile
Normal file
10
minix/commands/minix-service/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
# Makefile for minix-service
|
||||
PROGS= minix-service printconfig
|
||||
SRCS.minix-service=minix-service.c parse.c util.c
|
||||
SRCS.printconfig=print.c parse.c util.c
|
||||
|
||||
BINDIR= /sbin
|
||||
MAN.minix-service= minix-service.8 system.conf.5
|
||||
MAN.printconfig=
|
||||
|
||||
.include <bsd.prog.mk>
|
@ -1,24 +1,24 @@
|
||||
.TH SERVICE 8
|
||||
.TH MINIX-SERVICE 8
|
||||
.SH NAME
|
||||
service \- Manage an operating system service.
|
||||
minix-service \- Manage an operating system service.
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
\fBservice [-b -c -n -p -r] (up|run|edit|update)\fR \fI<binary|self>\fR
|
||||
\fBminix-service [-b -c -n -p -r] (up|run|edit|update)\fR \fI<binary|self>\fR
|
||||
[\fB-args\fR \fI<args>\fR] [\fB-dev\fR \fI<special>\fR]
|
||||
[\fB-period\fR \fI<ticks>\fR]
|
||||
[\fB-script\fR \fI<path>\fR] [\fB-label\fR \fI<name>\fR]
|
||||
[\fB-config\fR \fI<path>\fR] [\fB-state\fR \fI<state>\fR]
|
||||
[\fB-maxtime\fR \fI<time>\fR]
|
||||
.PP
|
||||
\fBservice down\fR \fI<label>\fR
|
||||
\fBminix-service down\fR \fI<label>\fR
|
||||
.PP
|
||||
\fBservice refresh\fR \fI<label>\fR
|
||||
\fBminix-service refresh\fR \fI<label>\fR
|
||||
.PP
|
||||
\fBservice restart\fR \fI<label>\fR
|
||||
\fBminix-service restart\fR \fI<label>\fR
|
||||
.PP
|
||||
\fBservice clone\fR \fI<label>\fR
|
||||
\fBminix-service clone\fR \fI<label>\fR
|
||||
.PP
|
||||
\fBservice shutdown\fR
|
||||
\fBminix-service shutdown\fR
|
||||
.br
|
||||
.de FL
|
||||
.TP
|
||||
@ -32,7 +32,7 @@ service \- Manage an operating system service.
|
||||
..
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The \fBservice\fR utility instructs the reincarnation server (\fBRS\fR)
|
||||
The \fBminix-service\fR utility instructs the reincarnation server (\fBRS\fR)
|
||||
to perform an action for a given system service (an OS server
|
||||
or device driver). The action may concern an existing system service
|
||||
(SHIFT+F6 to list them all), or a new system service to be started
|
||||
@ -51,7 +51,7 @@ or device driver). The action may concern an existing system service
|
||||
.SH ACTIONS
|
||||
.PP
|
||||
.SS
|
||||
\fBservice up\fR \fI<binary>\fR
|
||||
\fBminix-service up\fR \fI<binary>\fR
|
||||
.PP
|
||||
.PP
|
||||
Starts a new system service identified by the given \fI<binary>\fR,
|
||||
@ -133,20 +133,20 @@ for the syntax to use in the system configuration file.
|
||||
The default is to use the global system configuration file \fB/etc/system.conf\fR.
|
||||
.PP
|
||||
.SS
|
||||
\fBservice run\fR \fI<binary>\fR
|
||||
\fBminix-service run\fR \fI<binary>\fR
|
||||
.PP
|
||||
.PP
|
||||
Runs a new system service identified by the given \fI<binary>\fR,
|
||||
which must be specified using an absolute path. Similar to
|
||||
\fBservice up\fR \fI<binary>\fR, but instructs \fBRS\fR not to
|
||||
\fBminix-service up\fR \fI<binary>\fR, but instructs \fBRS\fR not to
|
||||
restart the service upon termination. This action is currently a shorthand
|
||||
for \fBservice up\fR \fI<binary>\fR \fB-script\fR \fI/etc/rs.single\fR, which
|
||||
uses a recovery script that simply brings down the service upon termination.
|
||||
This action should be only used for short-lived programs that need system
|
||||
service privileges and do not require crash recovery support.
|
||||
for \fBminix-service up\fR \fI<binary>\fR \fB-script\fR \fI/etc/rs.single\fR,
|
||||
which uses a recovery script that simply brings down the service upon
|
||||
termination. This action should be only used for short-lived programs that need
|
||||
system service privileges and do not require crash recovery support.
|
||||
.PP
|
||||
.SS
|
||||
\fBservice edit\fR \fI<binary>\fR [\fB-label\fR \fI<name>\fR]
|
||||
\fBminix-service edit\fR \fI<binary>\fR [\fB-label\fR \fI<name>\fR]
|
||||
.PP
|
||||
.PP
|
||||
Edits settings of an existing system service identified by the given
|
||||
@ -158,7 +158,7 @@ associated to the service will no be updated. This
|
||||
action takes the same options supported by the \fBup\fR action.
|
||||
.PP
|
||||
.SS
|
||||
\fBservice update\fR \fI<binary|self>\fR
|
||||
\fBminix-service update\fR \fI<binary|self>\fR
|
||||
.PP
|
||||
.PP
|
||||
Live updates an existing system service with a new version identified by the
|
||||
@ -182,7 +182,7 @@ specifies the maximum amount time for the service to prepare
|
||||
for the update. The default is 0 (unlimited).
|
||||
.PP
|
||||
.SS
|
||||
\fBservice down\fR \fI<label>\fR
|
||||
\fBminix-service down\fR \fI<label>\fR
|
||||
.PP
|
||||
.PP
|
||||
Stops an existing system service identified by the given \fI<label>\fR. \fBRS\fR
|
||||
@ -190,28 +190,28 @@ will bring down the service without attempting to restart it. Critical system
|
||||
services cannot be shut down.
|
||||
.PP
|
||||
.SS
|
||||
\fBservice refresh\fR \fI<label>\fR
|
||||
\fBminix-service refresh\fR \fI<label>\fR
|
||||
.PP
|
||||
.PP
|
||||
Refreshes an existing system service identified by the given \fI<label>\fR.
|
||||
\fBRS\fR will kill the service and attempt to restart it.
|
||||
.PP
|
||||
.SS
|
||||
\fBservice restart\fR \fI<label>\fR
|
||||
\fBminix-service restart\fR \fI<label>\fR
|
||||
.PP
|
||||
.PP
|
||||
Restarts an existing terminated system service identified by the
|
||||
given \fI<label>\fR. This action can only be used from a recovery script.
|
||||
.PP
|
||||
.SS
|
||||
\fBservice clone\fR \fI<label>\fR
|
||||
\fBminix-service clone\fR \fI<label>\fR
|
||||
.PP
|
||||
.PP
|
||||
Clones an existing system service to create a replica \fBRS\fR will use
|
||||
to restart the service upon termination.
|
||||
.PP
|
||||
.SS
|
||||
\fBservice shutdown\fR
|
||||
\fBminix-service shutdown\fR
|
||||
.PP
|
||||
.PP
|
||||
Tells \fBRS\fR the system is about to shutdown and no system service should
|
||||
@ -219,15 +219,15 @@ be restarted upon termination.
|
||||
.PP
|
||||
.SH EXAMPLES
|
||||
.TP 20
|
||||
.B service up /sbin/is -period 5HZ
|
||||
.B minix-service up /sbin/is -period 5HZ
|
||||
# Start the IS server and check its status every 5 seconds.
|
||||
.br
|
||||
.TP 20
|
||||
.B service up /usr/sbin/dp8390 -args DPETH0=pci
|
||||
.B minix-service up /usr/sbin/dp8390 -args DPETH0=pci
|
||||
# Start the DP8390 ethernet driver, passing one argument.
|
||||
.br
|
||||
.TP 20
|
||||
.B service down lance
|
||||
.B minix-service down lance
|
||||
# Stop the system service with label lance.
|
||||
.br
|
||||
.SH "SEE ALSO"
|
@ -1117,8 +1117,8 @@ static const char *do_config(const char *label, char *filename, struct rs_config
|
||||
}
|
||||
if (cp == NULL)
|
||||
{
|
||||
fprintf(stderr, "service: service '%s' not found in '%s'\n",
|
||||
label, filename);
|
||||
fprintf(stderr, "minix-service: service '%s' not found in "
|
||||
"'%s'\n", label, filename);
|
||||
exit(1);
|
||||
}
|
||||
|
@ -12,9 +12,9 @@ The file
|
||||
.B /etc/system.conf
|
||||
is the global system configuration file that contains the
|
||||
configuration for all the primary system services. This is the file
|
||||
that the \fBservice\fR utility uses by default. Custom configuration
|
||||
that the \fBminix-service\fR utility uses by default. Custom configuration
|
||||
files with the same format can be specified on a per-service basis. See
|
||||
.BR service (8)
|
||||
.BR minix-service (8)
|
||||
for more details.
|
||||
|
||||
This page is a summary of all the elements that can be found in this
|
||||
@ -23,8 +23,8 @@ configuration file.
|
||||
The syntax used is that of the common configuration file described in
|
||||
.BR configfile (5).
|
||||
.PP
|
||||
The \fBservice\fR utility scans the configuration file from beginning to end
|
||||
to gather information about a specific system service when starting or
|
||||
The \fBminix-service\fR utility scans the configuration file from beginning to
|
||||
end to gather information about a specific system service when starting or
|
||||
updating the properties of a service.
|
||||
The file contains a collection of service entries of the form:
|
||||
|
||||
@ -47,7 +47,7 @@ be used:
|
||||
.RS
|
||||
specifies the user id or the user name to use to run the system service.
|
||||
\fISELF\fR can be used when the service has to start with the realuid of
|
||||
the user who's executing the \fBservice\fR utility.
|
||||
the user who's executing the \fBminix-service\fR utility.
|
||||
Many system services run with root privileges (uid \fB0\fR).
|
||||
The default user is service (uid \fB12\fR).
|
||||
.RE
|
||||
@ -174,7 +174,7 @@ The default is to allow no controller services.
|
||||
.PP
|
||||
.SH "SEE ALSO"
|
||||
.BR configfile (5),
|
||||
.BR service (8),
|
||||
.BR minix-service (8),
|
||||
.BR boot (8).
|
||||
.SH AUTHOR
|
||||
Cristiano Giuffrida <giuffrida@cs.vu.nl>
|
@ -7,7 +7,7 @@ void fatal(char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
fprintf(stderr, "service: fatal error: ");
|
||||
fprintf(stderr, "minix-service: fatal error: ");
|
||||
va_start(ap, fmt);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
@ -20,7 +20,7 @@ void warning(char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
fprintf(stderr, "service: warning: ");
|
||||
fprintf(stderr, "minix-service: warning: ");
|
||||
va_start(ap, fmt);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
@ -1,10 +0,0 @@
|
||||
# Makefile for service
|
||||
PROGS= service printconfig
|
||||
SRCS.service=service.c parse.c util.c
|
||||
SRCS.printconfig=print.c parse.c util.c
|
||||
|
||||
BINDIR= /bin
|
||||
MAN.service= service.8 system.conf.5
|
||||
MAN.printconfig=
|
||||
|
||||
.include <bsd.prog.mk>
|
@ -2,4 +2,4 @@
|
||||
|
||||
# 'Recovery' script immediately restarts.
|
||||
echo "Arguments: $@" >/dev/console
|
||||
service restart "$1"
|
||||
minix-service restart "$1"
|
||||
|
@ -9,7 +9,7 @@ EXE=$EXEDIR/$NAME
|
||||
|
||||
start_driver()
|
||||
{
|
||||
service up $EXE -label $LABEL -script /etc/rs.single -period 3HZ
|
||||
minix-service up $EXE -label $LABEL -script /etc/rs.single -period 3HZ
|
||||
}
|
||||
|
||||
do_one()
|
||||
@ -51,7 +51,7 @@ one_round()
|
||||
}
|
||||
|
||||
# Start our own driver.
|
||||
service down $LABEL
|
||||
minix-service down $LABEL
|
||||
sleep 10 # Allow driver to die
|
||||
start_driver
|
||||
|
||||
|
@ -101,9 +101,9 @@ random)
|
||||
esac
|
||||
|
||||
# Start our own driver.
|
||||
service down $LABEL
|
||||
minix-service down $LABEL
|
||||
sleep 2 # Allow driver to die
|
||||
service up $EXE -script `pwd`/rs.restart_imm -period 3HZ $DEV
|
||||
minix-service up $EXE -script `pwd`/rs.restart_imm -period 3HZ $DEV
|
||||
|
||||
i=0
|
||||
while [ $i -lt "$count" ]
|
||||
@ -119,4 +119,4 @@ do
|
||||
done
|
||||
|
||||
# Restart the driver
|
||||
service refresh $LABEL
|
||||
minix-service refresh $LABEL
|
||||
|
@ -121,9 +121,9 @@ random)
|
||||
esac
|
||||
|
||||
# Start our own driver.
|
||||
service down $LABEL
|
||||
minix-service down $LABEL
|
||||
sleep 10 # Allow driver to die
|
||||
service up $EXE -script `pwd`/rs.restart_imm -period 3HZ
|
||||
minix-service up $EXE -script `pwd`/rs.restart_imm -period 3HZ
|
||||
|
||||
i=0
|
||||
while [ $i -lt "$count" ]
|
||||
@ -143,4 +143,4 @@ echo "driver crashed after $fault_blocks blocks"
|
||||
echo "driver failed to connect after $connect_blocks blocks"
|
||||
|
||||
# Restart the driver
|
||||
service refresh $LABEL
|
||||
minix-service refresh $LABEL
|
||||
|
@ -35,7 +35,7 @@ The following options are available:
|
||||
Enable verbose mode.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr service 8
|
||||
.Xr minix-service 8
|
||||
.Sh AUTHORS
|
||||
The
|
||||
.Nm
|
||||
|
@ -25,8 +25,8 @@ SKIP="memory vm"
|
||||
STATES="vfs:2 ahci_:2 virtio_blk_:2"
|
||||
|
||||
# If this variable is set, it is used as timeout for the live updates. The
|
||||
# service(8) argument takes a number of click ticks, or a number of seconds
|
||||
# if the value ends with "HZ".
|
||||
# minix-service(8) argument takes a number of click ticks, or a number of
|
||||
# seconds if the value ends with "HZ".
|
||||
TIMEOUT=300HZ
|
||||
|
||||
# Configuration ends here.
|
||||
@ -122,7 +122,7 @@ for service in $services; do
|
||||
# Perform the live update. The update may legitimately fail if the
|
||||
# service is not in the right state. TODO: report transient errors
|
||||
# as debugging output only.
|
||||
service -a update $binary -progname $filename -label $label \
|
||||
minix-service -a update $binary -progname $filename -label $label \
|
||||
-asr-count $count $state $maxtime
|
||||
error=$?
|
||||
if [ $error -eq 0 ]; then
|
||||
|
@ -6,4 +6,4 @@ es1371/ ES1371 driver
|
||||
sb16/ SB16 ISA driver
|
||||
|
||||
Running the drivers:
|
||||
* service up /service/es137{0,1} -dev /dev/audio
|
||||
* minix-service up /service/es137{0,1} -dev /dev/audio
|
||||
|
@ -11,8 +11,8 @@ Installation instructions SB16 driver Minix >= 3.0.7
|
||||
(default 7 and 220)
|
||||
- make install
|
||||
- MAKEDEV /dev/audio (if /dev/audio doesn't allready exist)
|
||||
- service up /service/sb16_dsp -dev /dev/audio
|
||||
- service up /service/sb16_mixer -dev /dev/mixer
|
||||
- minix-service up /service/sb16_dsp -dev /dev/audio
|
||||
- minix-service up /service/sb16_mixer -dev /dev/mixer
|
||||
done... (you can include the last 2 lines in /usr/etc/rc)
|
||||
|
||||
|
||||
|
@ -33,9 +33,9 @@ cd /dev && MAKEDEV i2c-1 && MAKEDEV i2c-2 && MAKEDEV i2c-3
|
||||
|
||||
Starting up the instances:
|
||||
|
||||
/bin/service up /service/i2c -dev /dev/i2c-1 -label i2c.1 -args instance=1
|
||||
/bin/service up /service/i2c -dev /dev/i2c-2 -label i2c.2 -args instance=2
|
||||
/bin/service up /service/i2c -dev /dev/i2c-3 -label i2c.3 -args instance=3
|
||||
/sbin/minix-service up /service/i2c -dev /dev/i2c-1 -label i2c.1 -args instance=1
|
||||
/sbin/minix-service up /service/i2c -dev /dev/i2c-2 -label i2c.2 -args instance=2
|
||||
/sbin/minix-service up /service/i2c -dev /dev/i2c-3 -label i2c.3 -args instance=3
|
||||
|
||||
There is an i2cscan program from NetBSD which can detect devices on the bus:
|
||||
|
||||
|
@ -12,5 +12,5 @@ Testing the Code
|
||||
|
||||
Starting up an instance:
|
||||
|
||||
/bin/service up /service/cat24c256 -dev /dev/eepromb1s50 -label cat24c256.1.50 -args 'bus=1 address=0x50'
|
||||
/sbin/minix-service up /service/cat24c256 -dev /dev/eepromb1s50 -label cat24c256.1.50 -args 'bus=1 address=0x50'
|
||||
|
||||
|
@ -12,9 +12,9 @@ Testing the Code
|
||||
|
||||
Starting up an instance:
|
||||
|
||||
/bin/service up /usr/sbin/tps65217 -label tps65217.1.24 \
|
||||
/sbin/minix-service up /usr/sbin/tps65217 -label tps65217.1.24 \
|
||||
-args 'bus=1 address=0x24'
|
||||
|
||||
Killing an instance:
|
||||
|
||||
/bin/service down tps65217.1.24
|
||||
/sbin/minix-service down tps65217.1.24
|
||||
|
@ -28,9 +28,9 @@ Testing the Code
|
||||
|
||||
Starting up an instance:
|
||||
|
||||
/bin/service up /service/tps65950 -label tps65950.1.48 \
|
||||
/sbin/minix-service up /service/tps65950 -label tps65950.1.48 \
|
||||
-args 'bus=1 address=0x48'
|
||||
|
||||
Killing an instance:
|
||||
|
||||
/bin/service down tps65950.1.48
|
||||
/sbin/minix-service down tps65950.1.48
|
||||
|
@ -30,9 +30,9 @@ Limitations
|
||||
|
||||
The measurement resolution is configurable in the chip, but this driver just
|
||||
uses standard mode. It could probably be implemented with an ioctl() or by
|
||||
passing an argument via the service command, but it doesn't seem too useful at
|
||||
this time. See the data sheet for the trade-offs between conversion time,
|
||||
power consumption, and resolution.
|
||||
passing an argument via the minix-service command, but it doesn't seem too
|
||||
useful at this time. See the data sheet for the trade-offs between conversion
|
||||
time, power consumption, and resolution.
|
||||
|
||||
While only the BMP085 is supported at present, the BMP085's predecessor,
|
||||
SMD500, should be easy to support in this driver with some small changes
|
||||
@ -50,8 +50,8 @@ The driver should have been started by a script in /etc/rc.capes/ If not,
|
||||
this is how you start up an instance:
|
||||
|
||||
cd /dev && MAKEDEV bmp085b3s77
|
||||
/bin/service up /service/bmp085 -label bmp085.3.77 -dev /dev/bmp085b3s77 \
|
||||
-args 'bus=3 address=0x77'
|
||||
/sbin/minix-service up /service/bmp085 -label bmp085.3.77 \
|
||||
-dev /dev/bmp085b3s77 -args 'bus=3 address=0x77'
|
||||
|
||||
Getting the sensor value:
|
||||
|
||||
@ -59,5 +59,5 @@ cat /dev/bmp085b3s77
|
||||
|
||||
Killing an instance:
|
||||
|
||||
/bin/service down bmp085.3.77
|
||||
/sbin/minix-service down bmp085.3.77
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@ -35,9 +35,9 @@ second will return cached temperature and humidity values.
|
||||
The measurement resolution is configurable in the chip, but this driver just
|
||||
uses the default maximum resolutions (12-bit for Humidity, 14-bit for
|
||||
temperature). It could probably be implemented with an ioctl() or by passing
|
||||
an argument via the service command, but it doesn't seem too useful at this
|
||||
time. See the data sheet for the trade-off between faster conversion time and
|
||||
lower resolution.
|
||||
an argument via the minix-service command, but it doesn't seem too useful at
|
||||
this time. See the data sheet for the trade-off between faster conversion time
|
||||
and lower resolution.
|
||||
|
||||
In testing, the temperature sensor reported a value several degrees higher
|
||||
than an indoor thermometer placed nearby. It doesn't appear to be a bug in the
|
||||
@ -54,7 +54,7 @@ The driver should have been started by a script in /etc/rc.capes/ If not,
|
||||
this is how you start up an instance:
|
||||
|
||||
cd /dev && MAKEDEV sht21b3s40
|
||||
/bin/service up /service/sht21 -label sht21.3.40 -dev /dev/sht21b3s40 \
|
||||
/sbin/minix-service up /service/sht21 -label sht21.3.40 -dev /dev/sht21b3s40 \
|
||||
-args 'bus=3 address=0x40'
|
||||
|
||||
Getting the sensor value:
|
||||
@ -63,5 +63,5 @@ cat /dev/sht21b3s40
|
||||
|
||||
Killing an instance:
|
||||
|
||||
/bin/service down sht21.3.40
|
||||
/sbin/minix-service down sht21.3.40
|
||||
|
||||
|
@ -33,8 +33,8 @@ The driver should have been started by a script in /etc/rc.capes/ If not,
|
||||
this is how you start up an instance:
|
||||
|
||||
cd /dev && MAKEDEV tsl2550b3s39
|
||||
/bin/service up /service/tsl2550 -label tsl2550.3.39 -dev /dev/tsl2550b3s39 \
|
||||
-args 'bus=3 address=0x39'
|
||||
/sbin/minix-service up /service/tsl2550 -label tsl2550.3.39 \
|
||||
-dev /dev/tsl2550b3s39 -args 'bus=3 address=0x39'
|
||||
|
||||
Getting the sensor value:
|
||||
|
||||
@ -42,5 +42,5 @@ cat /dev/tsl2550b3s39
|
||||
|
||||
Killing an instance:
|
||||
|
||||
/bin/service down tsl2550.3.39
|
||||
/sbin/minix-service down tsl2550.3.39
|
||||
|
||||
|
@ -4,7 +4,7 @@ driver (mmcblk.c).
|
||||
* Mini how-to
|
||||
On the BeagleBone Black, the block device files /dev/c1d* (major = 8) are free.
|
||||
The driver can use /dev/c1d0.
|
||||
# service up /service/emmc -dev /dev/c1d0
|
||||
# minix-service up /service/emmc -dev /dev/c1d0
|
||||
|
||||
* Programmed Input/Output
|
||||
The driver does not have support for DMA.
|
||||
|
@ -96,8 +96,9 @@ apply_env()
|
||||
/* apply the env setting passed to this driver parameters accepted
|
||||
* log_level=[0-4] (NONE,WARN,INFO,DEBUG,TRACE) instance=[0-3]
|
||||
* instance/bus number to use for this driver Passing these arguments
|
||||
* is done when starting the driver using the service command in the
|
||||
* following way service up /service/mmc -args "log_level=2 instance=1
|
||||
* is done when starting the driver using the minix-service command in
|
||||
* the following way:
|
||||
* minix-service up /service/mmc -args "log_level=2 instance=1
|
||||
* driver=dummy" -dev /dev/c2d0 */
|
||||
char driver[16];
|
||||
memset(driver, '\0', 16);
|
||||
|
@ -45,8 +45,8 @@ PROGRAMS+= mount
|
||||
dir.mount:= minix/commands/mount
|
||||
PROGRAMS+= procfs
|
||||
dir.procfs:= minix/fs/procfs
|
||||
PROGRAMS+= service
|
||||
dir.service:= minix/commands/service
|
||||
PROGRAMS+= minix-service
|
||||
dir.minix-service:= minix/commands/minix-service
|
||||
PROGRAMS+= sh
|
||||
dir.sh:= bin/sh
|
||||
PROGRAMS+= sysenv
|
||||
|
@ -13,7 +13,9 @@ d--755 0 0
|
||||
umount ---755 0 0 umount
|
||||
grep ---755 0 0 grep
|
||||
sh ---755 0 0 sh
|
||||
service ---755 0 0 service
|
||||
$
|
||||
sbin d--755 0 0
|
||||
minix-service ---755 0 0 minix-service
|
||||
$
|
||||
service d--755 0 0
|
||||
#ifdef __i386__
|
||||
|
@ -5,18 +5,20 @@ exec >/dev/log
|
||||
exec 2>/dev/log
|
||||
exec </dev/null
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
|
||||
FSCK=/bin/fsck_mfs
|
||||
ACPI=/service/acpi
|
||||
|
||||
if [ X`/bin/sysenv arch` = Xi386 ]
|
||||
then if [ -e $ACPI -a -n "`sysenv acpi`" ]
|
||||
then
|
||||
/bin/service -c up $ACPI
|
||||
minix-service -c up $ACPI
|
||||
fi
|
||||
/bin/service -c up /service/pci -dev /dev/pci
|
||||
minix-service -c up /service/pci -dev /dev/pci
|
||||
|
||||
/bin/service -c up /service/input -dev /dev/kbdmux
|
||||
/bin/service -c up /service/pckbd || :
|
||||
minix-service -c up /service/input -dev /dev/kbdmux
|
||||
minix-service -c up /service/pckbd || :
|
||||
|
||||
# Start procfs so we can access /proc/pci
|
||||
mount -t procfs none /proc >/dev/null
|
||||
@ -30,27 +32,27 @@ then if [ -e $ACPI -a -n "`sysenv acpi`" ]
|
||||
virtio_blk=yes
|
||||
fi
|
||||
|
||||
/bin/service -cn up /service/floppy -dev /dev/fd0
|
||||
minix-service -cn up /service/floppy -dev /dev/fd0
|
||||
if [ X`/bin/sysenv ahci` = Xyes ]
|
||||
then
|
||||
# this is here temporarily, for testing purposes
|
||||
/bin/service -c up /service/ahci -dev /dev/c0d0 -label ahci_0 -args instance=0
|
||||
minix-service -c up /service/ahci -dev /dev/c0d0 -label ahci_0 -args instance=0
|
||||
elif [ X"$virtio_blk" = Xyes ]
|
||||
then
|
||||
/bin/service -c up /service/virtio_blk -dev /dev/c0d0 -label virtio_blk_0 -args instance=0
|
||||
minix-service -c up /service/virtio_blk -dev /dev/c0d0 -label virtio_blk_0 -args instance=0
|
||||
else
|
||||
/bin/service -c up /service/at_wini -dev /dev/c0d0 -label at_wini_0
|
||||
/bin/service -cr up /service/at_wini -dev /dev/c1d0 -label at_wini_1 -args instance=1 2>/dev/null || :
|
||||
minix-service -c up /service/at_wini -dev /dev/c0d0 -label at_wini_0
|
||||
minix-service -cr up /service/at_wini -dev /dev/c1d0 -label at_wini_1 -args instance=1 2>/dev/null || :
|
||||
fi
|
||||
/bin/umount /proc >/dev/null
|
||||
fi
|
||||
|
||||
if [ X`/bin/sysenv arch` = Xearm ]
|
||||
then echo Starting the mmc driver
|
||||
/bin/service -c up /service/mmc -dev /dev/c0d0
|
||||
minix-service -c up /service/mmc -dev /dev/c0d0
|
||||
fi
|
||||
|
||||
/bin/service up /service/procfs || echo "WARNING: couldn't start procfs"
|
||||
minix-service up /service/procfs || echo "WARNING: couldn't start procfs"
|
||||
|
||||
if /bin/sysenv rootdevname >/dev/null
|
||||
then rootdevname=/dev/`/bin/sysenv rootdevname`
|
||||
|
@ -12,7 +12,7 @@ Testing the Code
|
||||
|
||||
Starting up an instance:
|
||||
|
||||
service up /service/fb -dev /dev/fb0 -args edid.0=cat24c256.3.50
|
||||
minix-service up /service/fb -dev /dev/fb0 -args edid.0=cat24c256.3.50
|
||||
|
||||
The arguments take the following form:
|
||||
|
||||
|
@ -45,11 +45,11 @@ static struct log log = {
|
||||
static char edid_providers[FB_DEV_NR][RS_MAX_LABEL_LEN+1];
|
||||
|
||||
/*
|
||||
* Populate edid_providers from command line arguments. The service command
|
||||
* should get EDID providers like this: "-args edid.0=tda19988.1.3470" where
|
||||
* 0 is the minor number of the frame buffer, tda19988 is the device driver,
|
||||
* 1 is the i2c bus and 3470 is the slave address (the TDA19988 has 2 slave
|
||||
* addresses 0x34 and 0x70).
|
||||
* Populate edid_providers from command line arguments. The minix-service
|
||||
* command should get EDID providers like this: "-args edid.0=tda19988.1.3470"
|
||||
* where 0 is the minor number of the frame buffer, tda19988 is the device
|
||||
* driver, 1 is the i2c bus and 3470 is the slave address (the TDA19988 has 2
|
||||
* slave addresses 0x34 and 0x70).
|
||||
*/
|
||||
int
|
||||
fb_edid_args_parse(void)
|
||||
|
@ -52,12 +52,12 @@ Testing the Code
|
||||
|
||||
Starting up an instance:
|
||||
|
||||
/bin/service up /service/tda19988 -label tda19988.1.3470 \
|
||||
/sbin/minix-service up /service/tda19988 -label tda19988.1.3470 \
|
||||
-args 'cec_bus=1 cec_address=0x34 hdmi_bus=1 hdmi_address=0x70'
|
||||
|
||||
Killing an instance:
|
||||
|
||||
/bin/service down tda19988.1.3470
|
||||
/sbin/minix-service down tda19988.1.3470
|
||||
|
||||
The driver is meant to be accessed from other drivers using the block
|
||||
device protocol, so it doesn't have a reserved major number and device file.
|
||||
@ -67,11 +67,11 @@ device file to read the EDID like this:
|
||||
cd /dev
|
||||
mknod tda19988 b 32 0
|
||||
chmod 600 tda19988
|
||||
/bin/service up /service/tda19988 -label tda19988.1.3470 \
|
||||
/sbin/minix-service up /service/tda19988 -label tda19988.1.3470 \
|
||||
-dev /dev/tda19988 \
|
||||
-args 'cec_bus=1 cec_address=0x34 hdmi_bus=1 hdmi_address=0x70'
|
||||
dd if=/dev/tda19988 of=/root/edid.dat count=1 bs=128
|
||||
/bin/service down tda19988.1.3470
|
||||
/sbin/minix-service down tda19988.1.3470
|
||||
hexdump -C /root/edid.dat
|
||||
rm tda19988
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef _MINIX_PATHS_H_
|
||||
#define _MINIX_PATHS_H_
|
||||
|
||||
#define _PATH_SERVICE "/bin/service"
|
||||
#define _PATH_MINIX_SERVICE "/sbin/minix-service"
|
||||
#define _PATH_PROC "/proc/"
|
||||
|
||||
#define _PATH_SYSTEM_CONF "/etc/system.conf"
|
||||
|
@ -20,9 +20,9 @@ static char fspath[] = "/service/:/usr/pkg/service/"; /* Must include trailing '
|
||||
static int rs_down(char *label)
|
||||
{
|
||||
char cmd[200];
|
||||
if(strlen(_PATH_SERVICE)+strlen(label)+50 >= sizeof(cmd))
|
||||
if(strlen(_PATH_MINIX_SERVICE)+strlen(label)+50 >= sizeof(cmd))
|
||||
return -1;
|
||||
sprintf(cmd, _PATH_SERVICE " down '%s'", label);
|
||||
sprintf(cmd, _PATH_MINIX_SERVICE " down '%s'", label);
|
||||
return system(cmd);
|
||||
}
|
||||
|
||||
@ -125,13 +125,14 @@ int minix_mount(char *special, char *name, int mountflags, int srvflags,
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if (strlen(_PATH_SERVICE) + strlen(path) + strlen(label) +
|
||||
if (strlen(_PATH_MINIX_SERVICE) + strlen(path) + strlen(label) +
|
||||
strlen(args) + 50 >= sizeof(cmd)) {
|
||||
errno = E2BIG;
|
||||
return -1;
|
||||
}
|
||||
|
||||
sprintf(cmd, _PATH_SERVICE " %sup %s -label '%s' -args '%s %s %s%s'",
|
||||
sprintf(cmd, _PATH_MINIX_SERVICE
|
||||
" %sup %s -label '%s' -args '%s %s %s%s'",
|
||||
reuse ? "-r ": "", path, label, special, name,
|
||||
args[0] ? "-o " : "", args);
|
||||
|
||||
|
@ -14,6 +14,6 @@ block_test() {
|
||||
if [ ! -b "$1" ]; then echo "$1 is not a block device" >&2; exit 1; fi
|
||||
pair=$(devtopair $1)
|
||||
if [ -z "$pair" ]; then echo "driver not found for $1" >&2; exit 1; fi
|
||||
service up `pwd`/blocktest -args "$pair,$2" -config system.conf \
|
||||
minix-service up `pwd`/blocktest -args "$pair,$2" -config system.conf \
|
||||
-script /etc/rs.single -label blocktest_$(stat -f '%r' $1)
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
# runs the ddekit driver on the given device with the given parameters
|
||||
run_ddekittest () {
|
||||
if [ ! -x ddekittest_driver ]; then echo "compile ddekittest first!" >&2; exit 1; fi
|
||||
service up `pwd`/ddekittest_driver -config system.conf \
|
||||
minix-service up `pwd`/ddekittest_driver -config system.conf \
|
||||
-script /etc/rs.single -label ddekittest
|
||||
}
|
||||
|
||||
@ -16,4 +16,4 @@ run_ddekittest () {
|
||||
#
|
||||
run_ddekittest
|
||||
sleep 10
|
||||
service down ddekittest
|
||||
minix-service down ddekittest
|
||||
|
@ -2,6 +2,6 @@
|
||||
|
||||
PWD=`pwd`
|
||||
|
||||
service up ${PWD}/subs -config system.conf -script /etc/rs.single
|
||||
service up ${PWD}/dstest -config system.conf -script /etc/rs.single
|
||||
service down subs
|
||||
minix-service up ${PWD}/subs -config system.conf -script /etc/rs.single
|
||||
minix-service up ${PWD}/dstest -config system.conf -script /etc/rs.single
|
||||
minix-service down subs
|
||||
|
@ -82,11 +82,11 @@ read_test() {
|
||||
EXP=$2
|
||||
shift 2
|
||||
$RWBLOCKS $DEV $PAT
|
||||
service up /service/fbd -dev /dev/fbd -args "$PAIR" || exit 1
|
||||
minix-service up /service/fbd -dev /dev/fbd -args "$PAIR" || exit 1
|
||||
fbdctl add $@ >/dev/null
|
||||
#fbdctl list
|
||||
RES="`$RWBLOCKS /dev/fbd`"
|
||||
service down fbd
|
||||
minix-service down fbd
|
||||
echo -n "$RES: "
|
||||
if echo "$RES" | egrep "^$EXP\$" >/dev/null 2>&1; then
|
||||
if [ "$OPT" = "-last" -a "$RES" != "$LAST" ]; then
|
||||
@ -115,11 +115,11 @@ write_test() {
|
||||
WS=$3
|
||||
shift 3
|
||||
$RWBLOCKS $DEV UUUUUUUUUUUUUUUU
|
||||
service up /service/fbd -dev /dev/fbd -args "$PAIR" || exit 1
|
||||
minix-service up /service/fbd -dev /dev/fbd -args "$PAIR" || exit 1
|
||||
fbdctl add $@ >/dev/null
|
||||
#fbdctl list
|
||||
$RWBLOCKS /dev/fbd $PAT $WS
|
||||
service down fbd
|
||||
minix-service down fbd
|
||||
RES="`$RWBLOCKS $DEV`"
|
||||
echo -n "$RES: "
|
||||
if echo "$RES" | egrep "^$EXP\$" >/dev/null 2>&1; then
|
||||
|
@ -3,7 +3,7 @@
|
||||
make >/dev/null
|
||||
|
||||
echo -n "Kernel test (sys_padconf): "
|
||||
service up `pwd`/padconftest -config system.conf -label padconftest -script /etc/rs.single
|
||||
minix-service up `pwd`/padconftest -config system.conf -label padconftest -script /etc/rs.single
|
||||
r=$?
|
||||
|
||||
if [ $r -ne 0 ]; then
|
||||
|
@ -3,10 +3,10 @@
|
||||
make >/dev/null
|
||||
|
||||
echo -n "Kernel test (sys_vumap): "
|
||||
service up `pwd`/vumaprelay -config system.conf -label vumaprelay -script /etc/rs.single
|
||||
service up `pwd`/vumaptest -config system.conf -script /etc/rs.single 2>/dev/null
|
||||
minix-service up `pwd`/vumaprelay -config system.conf -label vumaprelay -script /etc/rs.single
|
||||
minix-service up `pwd`/vumaptest -config system.conf -script /etc/rs.single 2>/dev/null
|
||||
r=$?
|
||||
service down vumaprelay
|
||||
minix-service down vumaprelay
|
||||
|
||||
if [ $r -ne 0 ]; then
|
||||
echo "failure"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
service down grantor
|
||||
service down requestor
|
||||
minix-service down grantor
|
||||
minix-service down requestor
|
||||
|
||||
|
@ -2,6 +2,6 @@
|
||||
|
||||
PWD=`pwd`
|
||||
|
||||
service up ${PWD}/grantor -config ${PWD}/system.conf -script ${PWD}/down
|
||||
service up ${PWD}/requestor -config ${PWD}/system.conf -script ${PWD}/down
|
||||
minix-service up ${PWD}/grantor -config ${PWD}/system.conf -script ${PWD}/down
|
||||
minix-service up ${PWD}/requestor -config ${PWD}/system.conf -script ${PWD}/down
|
||||
|
||||
|
@ -68,14 +68,14 @@ main(int argc, char *argv[])
|
||||
|
||||
/* stop residual testvm service if any */
|
||||
snprintf(cmdline, sizeof(cmdline), "%s down testvm >/dev/null 2>&1",
|
||||
_PATH_SERVICE);
|
||||
_PATH_MINIX_SERVICE);
|
||||
if(system(cmdline) < 0) { e(9); exit(1); }
|
||||
|
||||
/* start the testvm service */
|
||||
snprintf(cmdline, sizeof(cmdline),
|
||||
"%s up /%s/../testvm -script /etc/rs.single "
|
||||
"-args /%s/%s -config %s/../testvm.conf",
|
||||
_PATH_SERVICE, cwd, cwd, pipefn, cwd);
|
||||
_PATH_MINIX_SERVICE, cwd, cwd, pipefn, cwd);
|
||||
if(system(cmdline) < 0) { e(10); exit(1); }
|
||||
|
||||
/* don't hang forever if the open or read block */
|
||||
|
@ -93,7 +93,7 @@ prepare_service() {
|
||||
echo $flags | grep -q 'r' || return 0
|
||||
echo $flags | grep -q 'R' && return 0
|
||||
|
||||
service clone $label
|
||||
minix-service clone $label
|
||||
return 1
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ cleanup_service() {
|
||||
|
||||
label=$1
|
||||
|
||||
service unclone $label
|
||||
minix-service unclone $label
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
@ -120,7 +120,7 @@ pol_restart() {
|
||||
restarts_pre=$(get_value restarts ${service})
|
||||
endpoint_pre=$(get_value endpoint ${service})
|
||||
|
||||
service fi ${label}
|
||||
minix-service fi ${label}
|
||||
if ! wait_for_service ${service} ${restarts_pre}
|
||||
then
|
||||
echo not ok
|
||||
@ -154,7 +154,7 @@ pol_reset() {
|
||||
restarts_pre=$(get_value restarts ${service})
|
||||
endpoint_pre=$(get_value endpoint ${service})
|
||||
|
||||
service fi ${label}
|
||||
minix-service fi ${label}
|
||||
if ! wait_for_service ${service} ${restarts_pre}
|
||||
then
|
||||
echo not ok
|
||||
@ -187,7 +187,7 @@ lu_test_one() {
|
||||
lu_maxtime=${lu_maxtime:-3HZ}
|
||||
lu_state=${lu_state:-1}
|
||||
|
||||
service ${lu_opts} update ${prog} -label ${label} -maxtime ${lu_maxtime} -state ${lu_state}
|
||||
minix-service ${lu_opts} update ${prog} -label ${label} -maxtime ${lu_maxtime} -state ${lu_state}
|
||||
if [ $? -ne $result ]
|
||||
then
|
||||
return 1
|
||||
@ -271,18 +271,18 @@ multi_lu_test_one() {
|
||||
|
||||
if [ $index -eq $once_index ]
|
||||
then
|
||||
service ${lu_opts_once} -q update self \
|
||||
minix-service ${lu_opts_once} -q update self \
|
||||
-label ${label} \
|
||||
-maxtime ${lu_maxtime_once} \
|
||||
-state ${lu_state_once} || ret=2
|
||||
else
|
||||
service ${lu_opts} -q update self \
|
||||
minix-service ${lu_opts} -q update self \
|
||||
-label ${label} \
|
||||
-maxtime ${lu_maxtime} \
|
||||
-state ${lu_state} || ret=2
|
||||
fi
|
||||
done
|
||||
service sysctl upd_run
|
||||
minix-service sysctl upd_run
|
||||
result=$?
|
||||
|
||||
# We may experience transient failures as a result of services
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
bomb() {
|
||||
echo $*
|
||||
service down rmibtest 2>/dev/null
|
||||
minix-service down rmibtest 2>/dev/null
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ old_nodes=`sysctl -n minix.mib.nodes 2>/dev/null` || bomb "no MIB stats?"
|
||||
old_objects=`sysctl -n minix.mib.objects 2>/dev/null` || bomb "no MIB stats?"
|
||||
old_remotes=`sysctl -n minix.mib.remotes 2>/dev/null` || bomb "no MIB stats?"
|
||||
|
||||
service up `pwd`/rmibtest -label rmibtest -config rmibtest.conf || \
|
||||
minix-service up `pwd`/rmibtest -label rmibtest -config rmibtest.conf || \
|
||||
bomb "unable to start test service"
|
||||
|
||||
cd ..
|
||||
@ -55,7 +55,7 @@ sysctl -wq minix.rtest.func=7895375 || bomb "unable to set func value"
|
||||
# Test the minix.test shadowing subtree using a subset of the regular MIB test
|
||||
./test87 19 >/dev/null || bomb "test87 reported failure"
|
||||
|
||||
service down rmibtest
|
||||
minix-service down rmibtest
|
||||
|
||||
sleep 1
|
||||
|
||||
|
@ -32,7 +32,7 @@ if vndconfig -l vnd0 >/dev/null 2>&1; then
|
||||
echo "ok"
|
||||
exit 0
|
||||
else
|
||||
service down vnd0
|
||||
minix-service down vnd0
|
||||
fi
|
||||
fi
|
||||
if vndconfig -l vnd1 >/dev/null 2>&1; then
|
||||
@ -41,7 +41,7 @@ if vndconfig -l vnd1 >/dev/null 2>&1; then
|
||||
echo "ok"
|
||||
exit 0
|
||||
else
|
||||
service down vnd1
|
||||
minix-service down vnd1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -149,7 +149,7 @@ start_service(char *dev)
|
||||
|
||||
snprintf(cmd, sizeof(cmd),
|
||||
"%s up %s/vnd -label vnd%u -args instance=%u -dev %s",
|
||||
_PATH_SERVICE, _PATH_DRIVERS, n, n, dev);
|
||||
_PATH_MINIX_SERVICE, _PATH_DRIVERS, n, n, dev);
|
||||
|
||||
status = system(cmd);
|
||||
|
||||
@ -183,8 +183,8 @@ stop_service(int fd, char *dev)
|
||||
if (verbose)
|
||||
printf("%s: stopping driver\n", dev);
|
||||
|
||||
snprintf(cmd, sizeof(cmd), "%s down vnd%u", _PATH_SERVICE,
|
||||
vnu.vnu_unit);
|
||||
snprintf(cmd, sizeof(cmd), "%s down vnd%u",
|
||||
_PATH_MINIX_SERVICE, vnu.vnu_unit);
|
||||
|
||||
system(cmd);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user