Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153328316
D38295.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D38295.diff
View Options
diff --git a/usr.sbin/service/service.8 b/usr.sbin/service/service.8
--- a/usr.sbin/service/service.8
+++ b/usr.sbin/service/service.8
@@ -48,6 +48,7 @@
.Nm
.Op Fl j Ar jail
.Op Fl v
+.Op Fl x
.Ar script
.Ar command
.Sh DESCRIPTION
@@ -102,6 +103,8 @@
above, but list all of the files, not just what is enabled.
.It Fl v
Be slightly more verbose.
+.It Fl x
+Do not fail if the service file doesn't exists.
.El
.Sh ENVIRONMENT
When used to run rc.d scripts the
diff --git a/usr.sbin/service/service.sh b/usr.sbin/service/service.sh
--- a/usr.sbin/service/service.sh
+++ b/usr.sbin/service/service.sh
@@ -45,11 +45,12 @@
echo "-R Stop and start enabled $local_startup services"
echo "-l List all scripts in /etc/rc.d and $local_startup"
echo '-r Show the results of boot time rcorder'
+ echo '-x Do not warn if rc file do not exists'
echo '-v Verbose'
echo ''
}
-while getopts 'j:ehlrRv' COMMAND_LINE_ARGUMENT ; do
+while getopts 'j:ehlrRxv' COMMAND_LINE_ARGUMENT ; do
case "${COMMAND_LINE_ARGUMENT}" in
j) JAIL="${OPTARG}" ;;
e) ENABLED=eopt ;;
@@ -57,6 +58,7 @@
l) LIST=lopt ;;
r) RCORDER=ropt ;;
R) RESTART=Ropt ;;
+ x) FAIL=xopt ;;
v) VERBOSE=vopt ;;
*) usage ; exit 1 ;;
esac
@@ -175,7 +177,9 @@
fi
done
+if [ -z "${FAIL}" ]; then
# If the script was not found
-echo "$script does not exist in /etc/rc.d or the local startup"
-echo "directories (${local_startup}), or is not executable"
-exit 1
+ echo "$script does not exist in /etc/rc.d or the local startup"
+ echo "directories (${local_startup}), or is not executable"
+ exit 1
+fi
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 21, 12:29 PM (19 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31910388
Default Alt Text
D38295.diff (1 KB)
Attached To
Mode
D38295: service: Add new -x option
Attached
Detach File
Event Timeline
Log In to Comment