public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Aaron Bauman" <bman@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/
Date: Sat,  5 May 2018 01:26:16 +0000 (UTC)	[thread overview]
Message-ID: <1525483339.f4441d977a0df1cc059b5ec38a2e7b66c9967f74.bman@gentoo> (raw)

commit:     f4441d977a0df1cc059b5ec38a2e7b66c9967f74
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Sat Apr 28 07:51:26 2018 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Sat May  5 01:22:19 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4441d97

app-emulation/lxc: remove unused files

Closes: https://github.com/gentoo/gentoo/pull/8182

 app-emulation/lxc/files/lxc.initd.3 | 117 -----------------------------------
 app-emulation/lxc/files/lxc.initd.5 | 118 ------------------------------------
 2 files changed, 235 deletions(-)

diff --git a/app-emulation/lxc/files/lxc.initd.3 b/app-emulation/lxc/files/lxc.initd.3
deleted file mode 100644
index 7725f571017..00000000000
--- a/app-emulation/lxc/files/lxc.initd.3
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-CONTAINER=${SVCNAME#*.}
-
-LXC_PATH=`lxc-config lxc.lxcpath`
-
-lxc_get_configfile() {
-	if [ -f "${LXC_PATH}/${CONTAINER}.conf" ]; then
-		echo "${LXC_PATH}/${CONTAINER}.conf"
-	elif [ -f "${LXC_PATH}/${CONTAINER}/config" ]; then
-		echo "${LXC_PATH}/${CONTAINER}/config"
-	else
-		eerror "Unable to find a suitable configuration file."
-		eerror "If you set up the container in a non-standard"
-		eerror "location, please set the CONFIGFILE variable."
-		return 1
-	fi
-}
-
-[ $CONTAINER != $SVCNAME ] && CONFIGFILE=${CONFIGFILE:-$(lxc_get_configfile)}
-
-lxc_get_var() {
-	awk 'BEGIN { FS="[ \t]*=[ \t]*" } $1 == "'$1'" { print $2; exit }' ${CONFIGFILE}
-}
-
-lxc_get_net_link_type() {
-	awk 'BEGIN { FS="[ \t]*=[ \t]*"; _link=""; _type="" }
-		$1 == "lxc.network.type" {_type=$2;}
-		$1 == "lxc.network.link" {_link=$2;}
-		{if(_link != "" && _type != ""){
-			printf("%s:%s\n", _link, _type );
-			_link=""; _type="";
-		}; }' <${CONFIGFILE}
-}
-
-checkconfig() {
-	if [ ${CONTAINER} = ${SVCNAME} ]; then
-		eerror "You have to create an init script for each container:"
-		eerror " ln -s lxc /etc/init.d/lxc.container"
-		return 1
-	fi
-
-	# no need to output anything, the function takes care of that.
-	[ -z "${CONFIGFILE}" ] && return 1
-
-	utsname=$(lxc_get_var lxc.utsname)
-	if [ ${CONTAINER} != ${utsname} ]; then
-	    eerror "You should use the same name for the service and the"
-	    eerror "container. Right now the container is called ${utsname}"
-	    return 1
-	fi
-}
-
-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
-}
-
-start() {
-	checkconfig || return 1
-	rm -f /var/log/lxc/${CONTAINER}.log
-
-	rootpath=$(lxc_get_var lxc.rootfs)
-
-	# Check the format of our init and the chroot's init, to see
-	# if we have to use linux32 or linux64; always use setarch
-	# when required, as that makes it easier to deal with
-	# x32-based containers.
-	case $(scanelf -BF '%a#f' ${rootpath}/sbin/init) in
-		EM_X86_64)	setarch=linux64;;
-		EM_386)		setarch=linux32;;
-	esac
-
-	ebegin "Starting ${CONTAINER}"
-	env -i ${setarch} $(type -p lxc-start) -l WARN -n ${CONTAINER} -f ${CONFIGFILE} -d -o /var/log/lxc/${CONTAINER}.log
-	sleep 0.5
-
-	# lxc-start -d will _always_ report a correct startup, even if it
-	# failed, so rather than trust that, check that the cgroup exists.
-	[ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]
-	eend $?
-}
-
-stop() {
-	checkconfig || return 1
-
-
-	if ! [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]; then
-	    ewarn "${CONTAINER} doesn't seem to be started."
-	    return 0
-	fi
-
-	# 10s should be enough to shut everything down
-	ebegin "Stopping ${CONTAINER}"
-	lxc-stop -t 10 -n ${CONTAINER}
-	eend $?
-}

diff --git a/app-emulation/lxc/files/lxc.initd.5 b/app-emulation/lxc/files/lxc.initd.5
deleted file mode 100644
index b28d0bfa7aa..00000000000
--- a/app-emulation/lxc/files/lxc.initd.5
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-CONTAINER=${SVCNAME#*.}
-
-LXC_PATH=`lxc-config lxc.lxcpath`
-
-lxc_get_configfile() {
-	if [ -f "${LXC_PATH}/${CONTAINER}.conf" ]; then
-		echo "${LXC_PATH}/${CONTAINER}.conf"
-	elif [ -f "${LXC_PATH}/${CONTAINER}/config" ]; then
-		echo "${LXC_PATH}/${CONTAINER}/config"
-	else
-		eerror "Unable to find a suitable configuration file."
-		eerror "If you set up the container in a non-standard"
-		eerror "location, please set the CONFIGFILE variable."
-		return 1
-	fi
-}
-
-[ $CONTAINER != $SVCNAME ] && CONFIGFILE=${CONFIGFILE:-$(lxc_get_configfile)}
-
-lxc_get_var() {
-	awk 'BEGIN { FS="[ \t]*=[ \t]*" } $1 == "'$1'" { print $2; exit }' ${CONFIGFILE}
-}
-
-lxc_get_net_link_type() {
-	awk 'BEGIN { FS="[ \t]*=[ \t]*"; _link=""; _type="" }
-		$1 == "lxc.network.type" {_type=$2;}
-		$1 == "lxc.network.link" {_link=$2;}
-		{if(_link != "" && _type != ""){
-			printf("%s:%s\n", _link, _type );
-			_link=""; _type="";
-		}; }' <${CONFIGFILE}
-}
-
-checkconfig() {
-	if [ ${CONTAINER} = ${SVCNAME} ]; then
-		eerror "You have to create an init script for each container:"
-		eerror " ln -s lxc /etc/init.d/lxc.container"
-		return 1
-	fi
-
-	# no need to output anything, the function takes care of that.
-	[ -z "${CONFIGFILE}" ] && return 1
-
-	utsname=$(lxc_get_var lxc.utsname)
-	if [ ${CONTAINER} != ${utsname} ]; then
-	    eerror "You should use the same name for the service and the"
-	    eerror "container. Right now the container is called ${utsname}"
-	    return 1
-	fi
-}
-
-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
-	use lxcfs
-
-	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
-}
-
-start() {
-	checkconfig || return 1
-	rm -f /var/log/lxc/${CONTAINER}.log
-
-	rootpath=$(lxc_get_var lxc.rootfs)
-
-	# Check the format of our init and the chroot's init, to see
-	# if we have to use linux32 or linux64; always use setarch
-	# when required, as that makes it easier to deal with
-	# x32-based containers.
-	case $(scanelf -BF '%a#f' ${rootpath}/sbin/init) in
-		EM_X86_64)	setarch=linux64;;
-		EM_386)		setarch=linux32;;
-	esac
-
-	ebegin "Starting ${CONTAINER}"
-	env -i ${setarch} $(which lxc-start) -l WARN -n ${CONTAINER} -f ${CONFIGFILE} -d -o /var/log/lxc/${CONTAINER}.log
-	sleep 0.5
-
-	# lxc-start -d will _always_ report a correct startup, even if it
-	# failed, so rather than trust that, check that the cgroup exists.
-	[ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]
-	eend $?
-}
-
-stop() {
-	checkconfig || return 1
-
-
-	if ! [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]; then
-	    ewarn "${CONTAINER} doesn't seem to be started."
-	    return 0
-	fi
-
-	# 10s should be enough to shut everything down
-	ebegin "Stopping ${CONTAINER}"
-	lxc-stop -t 10 -n ${CONTAINER}
-	eend $?
-}


             reply	other threads:[~2018-05-05  1:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-05  1:26 Aaron Bauman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-05-29 13:15 [gentoo-commits] repo/gentoo:master commit in: app-emulation/lxc/files/ Joonas Niilola
2018-01-03 11:06 Patrice Clement
2017-04-14 10:11 Sven Wegener
2017-02-03  8:51 Yixun Lan
2016-08-24 10:38 Pacho Ramos
2016-02-08 21:37 Sven Wegener
2015-09-05  8:08 Markos Chandras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1525483339.f4441d977a0df1cc059b5ec38a2e7b66c9967f74.bman@gentoo \
    --to=bman@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox