Package: sysvinit-utils
Version: 2.88dsf-59.3
Severity: normal

Dear Maintainer,

   * What led up to the situation?

The NAME environment variable is used by a few applications to obtain the users
real name but the NAME variable is not overwritten when set during an upgrade
of lvm2. Renaming the NAME variable in /lib/init/init-d-script to something
else (e.g., PROGNAME) should fix it.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

After the upgrade was complete, insserv exec'd /etc/init.d/lvmetad which
sources /lib/init/init-d-script.

   * What was the outcome of this action?

/etc/init.d/lvm2-lvmetad: 183: [: /etc/default/Ben: unexpected operator
Restarting LVM2 metadata daemon: Ben Kibbey.

   * What outcome did you expect instead?

Restarting LVM2 metadata daemon: lvm2-lvmetad



-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (999, 'testing'), (990, 'testing'), (800, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.5.2-00001-g3c69b4d (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages sysvinit-utils depends on:
ii  init-system-helpers  1.29
ii  libc6                2.22-7
ii  startpar             0.59-3

sysvinit-utils recommends no packages.

Versions of packages sysvinit-utils suggests:
pn  bootlogd  <none>
pn  sash      <none>

-- no debconf information
--- init-d-script.orig	2016-04-28 18:25:28.000000000 -0400
+++ init-d-script	2016-04-28 18:25:04.000000000 -0400
@@ -45,11 +45,11 @@
 do_start_cmd() {
 	start-stop-daemon --start --quiet ${PIDFILE:+--pidfile ${PIDFILE}} \
 	    $START_ARGS \
-	    --startas $DAEMON --name $NAME --exec $DAEMON --test > /dev/null \
+	    --startas $DAEMON --name $PROGNAME --exec $DAEMON --test > /dev/null \
 	    || return 1
 	start-stop-daemon --start --quiet ${PIDFILE:+--pidfile ${PIDFILE}} \
 	    $START_ARGS \
-	    --startas $DAEMON --name $NAME --exec $DAEMON -- $DAEMON_ARGS \
+	    --startas $DAEMON --name $PROGNAME --exec $DAEMON -- $DAEMON_ARGS \
 	    || return 2
 	# Add code here, if necessary, that waits for the process to be ready
 	# to handle requests from services started subsequently which depend
@@ -61,7 +61,7 @@
 	if is_call_implemented do_start_prepare ; then
 		call do_start_prepare
 	fi
-	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$PROGNAME"
 	call do_start_cmd
 	case "$?" in
 		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
@@ -84,7 +84,7 @@
 do_stop_cmd() {
 	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 \
 	    $STOP_ARGS \
-	    ${PIDFILE:+--pidfile ${PIDFILE}} --name $NAME --exec $DAEMON
+	    ${PIDFILE:+--pidfile ${PIDFILE}} --name $PROGNAME --exec $DAEMON
 	RETVAL="$?"
 	[ "$RETVAL" = 2 ] && return 2
 	# Wait for children to finish too if this is a daemon that forks
@@ -107,7 +107,7 @@
 	if is_call_implemented do_stop_prepare ; then
 		call do_stop_prepare
 	fi
-	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$PROGNAME"
 	call do_stop_cmd
 	case "$?" in
 		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
@@ -119,7 +119,7 @@
 }
 
 do_restart() {
-	[ "$VERBOSE" != no ] && log_daemon_msg "Restarting $DESC" "$NAME"
+	[ "$VERBOSE" != no ] && log_daemon_msg "Restarting $DESC" "$PROGNAME"
 	call do_stop_cmd
 	call do_start_cmd
 	case "$?" in
@@ -139,14 +139,14 @@
 # Enable this using
 # alias do_reload=do_reload_sigusr1
 do_reload_sigusr1() {
-        log_daemon_msg "Reloading $DESC configuration files" "$NAME"
+        log_daemon_msg "Reloading $DESC configuration files" "$PROGNAME"
         start-stop-daemon --oknodo --stop --signal 1 --quiet \
           --pidfile "$PIDFILE" --exec "$DAEMON"
         log_end_msg $?
 }
 
 do_status() {
-	status_of_proc "$DAEMON" "$NAME" && return 0 || return $?
+	status_of_proc "$DAEMON" "$PROGNAME" && return 0 || return $?
 }
 
 if [ "$DEBUG" = "true" ] ; then
@@ -163,15 +163,15 @@
     exit 0
 fi
 
-NAME=${NAME:=$(basename $DAEMON)}
-DESC=${DESC:=$NAME}
+PROGNAME=${PROGNAME:=$(basename $DAEMON)}
+DESC=${DESC:=$PROGNAME}
 
 # Do not use pid file if $PIDFILE is 'none'.  Otherwise, generate from
-# $NAME or use the value provided by the init.d script.
+# $PROGNAME or use the value provided by the init.d script.
 if [ none = "$PIDFILE" ] ; then
     PIDFILE=
 elif [ -z "$PIDFILE" ] ; then
-    PIDFILE=/var/run/$NAME.pid
+    PIDFILE=/var/run/$PROGNAME.pid
 fi
 
 # Exit if the package is not installed
@@ -180,7 +180,7 @@
 fi
 
 # Read configuration variable file if it is present
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+[ -r /etc/default/$PROGNAME ] && . /etc/default/$PROGNAME
 
 # Load the VERBOSE setting and other rcS variables
 . /lib/init/vars.sh
@@ -213,7 +213,7 @@
 	call do_restart
 	;;
   try-restart)
-        log_daemon_msg "Trying to restart $DESC" "$NAME"
+        log_daemon_msg "Trying to restart $DESC" "$PROGNAME"
 	if call do_status > /dev/null 2>&1 ; then
 	    call do_restart
             log_end_msg $?

Reply via email to