[Pkg-ocaml-maint-commits] [SCM] marionnet packaging branch, master, updated. upstream/0.90.6+bzr427-47-g4b22197
Lucas Nussbaum
lucas at debian.org
Fri Jul 5 19:00:25 UTC 2013
The following commit has been merged in the master branch:
commit 5a6eb65843d32411fe02d97e5185f83413de2d2d
Author: Lucas Nussbaum <lucas at debian.org>
Date: Fri Jul 5 20:59:21 2013 +0200
Improve init script to display a warning when no kernels or filesystems are found.
diff --git a/debian/marionnet.init b/debian/marionnet.init
index 511065a..5ab488b 100644
--- a/debian/marionnet.init
+++ b/debian/marionnet.init
@@ -33,6 +33,8 @@ SCRIPTNAME=/etc/init.d/$NAME
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
+VERBOSE=yes # VERBOSE=no does not really make sense for this package
+
#
# Function that starts the daemon/service
#
@@ -78,8 +80,25 @@ do_stop()
return "$RETVAL"
}
+# check for filesystems and kernels
+check_for_filesystems()
+{
+ FS=$(ls /usr/share/marionnet/filesystems/ | grep -v '\.conf$' | wc -l)
+ if [ ! \( -d /usr/share/marionnet/filesystems/ -a "$FS" -gt 0 -a -d /usr/share/marionnet/kernels \) ]; then
+ cat <<-EOF
+ /!\\ No kernels/filesystems for marionnet found! /!\\
+ Marionnet will start with very limited functionality.
+
+ For more information about donwloading kernels and filesystems,
+ read /usr/share/doc/marionnet/README.Debian
+EOF
+ fi
+}
+
+
case "$1" in
start)
+ check_for_filesystems
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
do_start
case "$?" in
--
marionnet packaging
More information about the Pkg-ocaml-maint-commits
mailing list