From e013b00167d64959ea48c781bdaff4c027968b01 Mon Sep 17 00:00:00 2001 From: Sangbum Kim Date: Thu, 6 Apr 2017 17:47:22 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EB=A6=84=20=EB=A6=AC=EB=84=A4?= =?UTF-8?q?=EC=9D=B4=EB=B0=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {inside => octopus-inside}/main.go | 0 {outside => octopus-outside}/main.go | 3 +-- services/{connet.service => octopus-inside.service} | 8 ++------ services/{plugin.service => octopus-outside.service} | 3 ++- 4 files changed, 5 insertions(+), 9 deletions(-) rename {inside => octopus-inside}/main.go (100%) rename {outside => octopus-outside}/main.go (98%) rename services/{connet.service => octopus-inside.service} (60%) rename services/{plugin.service => octopus-outside.service} (94%) diff --git a/inside/main.go b/octopus-inside/main.go similarity index 100% rename from inside/main.go rename to octopus-inside/main.go diff --git a/outside/main.go b/octopus-outside/main.go similarity index 98% rename from outside/main.go rename to octopus-outside/main.go index 6808781..4284ce4 100644 --- a/outside/main.go +++ b/octopus-outside/main.go @@ -1,7 +1,6 @@ package main import ( - // "github.com/ttacon/libphonenumber" "bytes" "errors" @@ -25,7 +24,7 @@ import ( ) var ( - app = kingpin.New("plugin", "nspawn Bootstrapper.").Author("Sangbum Kim") + app = kingpin.New("octopus-outside", "nspawn Bootstrapper.").Author("Sangbum Kim") verbosePtr = app.Flag("verbose", "Enable verbose mode.").Short('v').Bool() clearPtr = app.Flag("clear", "clear os environment.").Short('p').Bool() nspawnPathPtr = app.Flag("nspawn-path", "systemd-nspawn location.").Short('s').String() diff --git a/services/connet.service b/services/octopus-inside.service similarity index 60% rename from services/connet.service rename to services/octopus-inside.service index a3cf0e2..bdbf50f 100644 --- a/services/connet.service +++ b/services/octopus-inside.service @@ -1,11 +1,8 @@ [Unit] -Description=MACVLAN setup -#Documentation=man:systemd-networkd.service(8) +Description=octopus-inside, systemd-nspawn network configuration injector ConditionCapability=CAP_NET_ADMIN DefaultDependencies=no -# dbus.service can be dropped once on kdbus, and systemd-udevd.service can be -# dropped once tuntap is moved to netlink After=systemd-udevd.service dbus.service network-pre.target systemd-sysusers.service systemd-sysctl.service Before=network.target multi-user.target shutdown.target Conflicts=shutdown.target @@ -13,10 +10,9 @@ Wants=network-online.target [Service] -# the VT is cleared by TTYVTDisallocate RemainAfterExit=yes EnvironmentFile=/proc/1/environ -ExecStart=/usr/bin/connet +ExecStart=/usr/bin/octopus-inside Type=oneshot [Install] WantedBy=multi-user.target diff --git a/services/plugin.service b/services/octopus-outside.service similarity index 94% rename from services/plugin.service rename to services/octopus-outside.service index 88cf90b..a51cfb9 100644 --- a/services/plugin.service +++ b/services/octopus-outside.service @@ -11,10 +11,11 @@ Documentation=man:systemd-nspawn(1) PartOf=machines.target Before=machines.target After=network.target +After=dnsmasq.service After=pdnsd.service [Service] -ExecStart=/container/plugin %I igb0 -v +ExecStart=/container/octopus-outside %I igb0 -v KillMode=mixed Type=notify RestartForceExitStatus=133