Jump to content

Photo

LXC init.d script

- - - - -

3 replies to this topic

#1
Chris Kurlinski

Chris Kurlinski

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts
  • LocationNassau, The Bahamas

Just found an error in the init.d lxc script

The ebuild depend section is:

depend() {
        # be quiet, since we have to run depend() also for the
        # non-muxed init script, unfortunately.
        checkconfig 2>/dev/null || return 0

        config ${CONFIGFILE}
        need localmount

        local _x _if
        for _x in $(lxc_get_net_link_type); do
                _if=${_x%:*}
                case "${_x##*:}" in
                        # when the network type is set to phys, we can make use of a
                        # network service (for instance to set it up before we disable
                        # the net_admin capability), but we might also not set it up
                        # at all on the host and leave the net_admin capable service
                        # to take care of it.
                        phys)   use net.${_if} ;;
                        *)	need net.${_if} ;;
                esac
        done
}

But the net.{$_if} is wrong. 

Should be netif.${_if}

 

Changed it in my lxc init.d script, and my container start right up.

 

Don't know what to do with the info.

Just sharing.

 


  • cardinal likes this

#2
cardinal

cardinal

    Advanced Member

  • Members
  • PipPipPip
  • 224 posts

You should file a report @ bugs.funtoo.org so Daniel or Oleg will see it.


  • 666threesixes666 likes this

#3
Chris Kurlinski

Chris Kurlinski

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts
  • LocationNassau, The Bahamas

Here's a diff

*** lxc 2015-12-22 06:55:00.886700278 -0500
--- lxc.mod     2015-12-22 06:55:23.323701398 -0500
***************
*** 71,78 ****
                        # the net_admin capability), but we might also not set it up
                        # at all on the host and leave the net_admin capable service
                        # to take care of it.
!                       phys)   use net.${_if} ;;
!                       *)	need net.${_if} ;;
                esac
        done
  }
--- 71,78 ----
                        # the net_admin capability), but we might also not set it up
                        # at all on the host and leave the net_admin capable service
                        # to take care of it.
!                       phys)   use netif.${_if} ;;
!                       *)	need netif.${_if} ;;
                esac
        done
  }


#4
Chris Kurlinski

Chris Kurlinski

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts
  • LocationNassau, The Bahamas

I am an idiot...

I just realised that the last time I did an install, I used netif.${whatever} as the name of my symbolic links in my network configs....

 

Please ignore my failing.

It was an ID10T error #101 - PEBCAK....





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users