Navigation Menu

Skip to content

Commit

Permalink
OS-3725 would like dockerexec helper for zlogin
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwilsdon committed Jan 27, 2015
1 parent 784d482 commit a950e7e
Show file tree
Hide file tree
Showing 7 changed files with 812 additions and 524 deletions.
9 changes: 8 additions & 1 deletion src/Makefile
Expand Up @@ -292,6 +292,7 @@ ZUTIL_BINDINGS.NODE = $(ZUTIL_SRCDIR)/../lib/zutil_bindings.node
#
TARGETS = \
bootparams \
dockerinit/build/dockerexec \
dockerinit/build/dockerinit \
diskinfo \
disklayout \
Expand Down Expand Up @@ -377,6 +378,7 @@ install: all
< node-expat/lib/node-expat.js \
> $(PREFIX_NODE)/node_modules/node-expat.js
cp dockerinit/build/dockerinit $(DESTDIR)/usr/vm/sbin/dockerinit
cp dockerinit/build/dockerexec $(DESTDIR)/usr/vm/sbin/dockerexec
cp zoneevent $(DESTDIR)/usr/vm/sbin/zoneevent
cp zfs_send $(DESTDIR)/usr/vm/sbin/zfs_send
cp zfs_recv $(DESTDIR)/usr/vm/sbin/zfs_recv
Expand Down Expand Up @@ -499,7 +501,12 @@ disklist: disklist.sh
cp disklist.sh disklist
chmod 0755 disklist

dockerinit/build/dockerinit: dockerinit/src/dockerinit.c
dockerinit/build/dockerexec: dockerinit/src/dockerexec.c \
dockerinit/src/docker-common.c
@(cd dockerinit && $(MAKE) build/dockerexec)

dockerinit/build/dockerinit: dockerinit/src/dockerinit.c \
dockerinit/src/docker-common.c
@(cd dockerinit && $(MAKE) build/dockerinit)

mkzpool: mkzpool.js
Expand Down
11 changes: 9 additions & 2 deletions src/dockerinit/Makefile
Expand Up @@ -14,7 +14,7 @@ MDATA_OBJS= \
MDATA_LIBS=-lnsl -lsocket -lsmbios
NET_LIBS=-lipadm -linetutil -lnsl -lsocket
LIBS=$(JSON_LIBS) $(MDATA_LIBS) $(NET_LIBS)
OBJS=$(JSON_OBJS) $(MDATA_OBJS)
OBJS=$(JSON_OBJS) $(MDATA_OBJS) src/docker-common.o

# NOTE: we add the '-z now' here to the CFLAGS because otherwise we'll try to
# load libdladm.so.1 after we've entered a chroot and it will look in the wrong
Expand All @@ -23,12 +23,19 @@ CC=gcc
CFLAGS=-Wall -Wextra -D__HAVE_BOOLEAN_T -m32 -z now
CSTYLE=../../tools/cstyle

all: build/dockerinit
all: build/dockerinit build/dockerexec

build/dockerexec: src/dockerexec.c $(OBJS)
mkdir -p build
$(CC) $(CFLAGS) -o build/dockerexec src/dockerexec.c $(OBJS) $(LIBS)

build/dockerinit: src/dockerinit.c $(OBJS)
mkdir -p build
$(CC) $(CFLAGS) -o build/dockerinit src/dockerinit.c $(OBJS) $(LIBS)

src/docker-common.o: src/docker-common.c
$(CC) -c $(CFLAGS) -o $@ $<

mdata-client/plat/%.o: mdata-client/plat/%.c
(cd mdata-client && $(MAKE) plat/$(@F))

Expand Down

0 comments on commit a950e7e

Please sign in to comment.