Package: lxc
Version: 0.7.4.2-0.1
Severity: normal
Tags: sid

When the directory "/etc/lxc/auto" is empty:

service lxc restart
Restarting LXC containers: *.
 *Can't find config file /etc/lxc/bin.conf ... failed!


The attached file has corrected this error


-- System Information:
Debian Release: 6.0.2
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2)
Shell: /bin/sh linked to /bin/bash

Versions of packages lxc depends on:
ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib
ii  libcap2                       1:2.19-3   support for getting/setting POSIX.

Versions of packages lxc recommends:
ii  libcap2-bin                   1:2.19-3   basic utility programs for using c

lxc suggests no packages.

-- Configuration Files:
/etc/init.d/lxc changed:
NAME=lxc
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
LXCDOMAINS_AUTO="/etc/lxc/auto"
DESC="LXC containers"
SCRIPTNAME="/etc/init.d/lxc"
. /lib/lsb/init-functions
if [ -f /etc/default/$NAME ] ; then
  . /etc/default/$NAME
fi
if [ "x$RUN" != "xyes" ] ; then
  log_success_msg "$NAME init script disabled; edit /etc/default/$NAME"
  exit 0
fi
if [ ! -d "$LXCDOMAINS_AUTO" ]; then
  log_success_msg "$NAME missing LXC autostart directory $LXCDOMAINS_AUTO"
  exit 0
fi
is_running() {
  name=$1
  RC=1
  if [ $(lxc-info -n $name | grep "RUNNING" -c) -eq 1 ]; then
    RC=0
  fi
  return $RC
}
start_one() {
  name=$1
  if [ -f "$CONF_DIR/$name.conf" ]; then
    lxc-start -n $name -f $CONF_DIR/$name.conf -d
  else
    log_failure_msg "Can't find config file $CONF_DIR/$name.conf"
  fi
}
action_all() {
  action=$1
  nolog=$2
  for i in $LXCDOMAINS_AUTO/*; do
    if [ ! -e "$i" ]; then
      continue
    fi
    NAME=$(basename $i .conf)
    [ -n "$nolog" ] || log_progress_msg "$NAME"
    if [ "$action" = "start_one" ]; then
       if is_running $NAME; then
         [ -n "$nolog" ] || log_progress_msg "(skip)"
       else
         $action $NAME
       fi
    else
      $action $NAME
    fi
  done
  [ -n "$nolog" ] || log_end_msg 0
}
case "$1" in
  start)
    log_daemon_msg "Starting $DESC"
    action_all start_one
    ;;
  stop)
    log_daemon_msg "Stopping $DESC"
    action_all "lxc-stop -n"
    ;;
  restart|force-reload)
    log_daemon_msg "Restarting $DESC"
    action_all "lxc-stop -n"
    action_all start_one
    ;;
  destroy)
    log_daemon_msg "Destroying $DESC"
    action_all "lxc-destroy -n"
    ;;
  freeze)
    log_daemon_msg "Freezing $DESC"
    action_all "lxc-freeze -n"
    ;;
  unfreeze)
    log_daemon_msg "Unfreezing $DESC"
    action_all "lxc-unfreeze -n"
    ;;
  info)
    log_daemon_msg "Info on $DESC" "$NAME"
    log_end_msg 0
    action_all "lxc-info -n" "nolog"
    ;;
  *)
    log_success_msg "Usage: $SCRIPTNAME 
{start|stop|force-reload|restart|destroy|freeze|unfreeze|info}"
    exit 1
    ;;
esac
exit 0


-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to