Skip to content

Commit

Permalink
remove cloud-init-firstboot service
Browse files Browse the repository at this point in the history
cloud-init-firstboot service is not more needed because
cloud-init service can use --user-data-once option to
process only on first boot user data
  • Loading branch information
Julio Montes committed Jan 28, 2016
1 parent 7c04bc1 commit a819740
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 26 deletions.
5 changes: 1 addition & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ AM_CFLAGS = -std=gnu99 -fstack-protector -Wall -pedantic \
EXTRA_DIST = \
LICENSE \
COPYING \
data/cloud-init-firstboot.service.in
data/cloud-init.service.in

DISTCHECK_CONFIGURE_FLAGS = \
Expand Down Expand Up @@ -69,17 +68,15 @@ cloud_init_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS) $(YAML_CFLAGS) $(JSON_GLIB_CFLAG
cloud_init_LDADD = $(GLIB_LIBS) $(YAML_LIBS) $(CURL_LIBS) $(JSON_GLIB_LIBS) $(PARTED_LIBS) $(BLKID_LIBS)
SYSTEMD_DIR=$(prefix)/lib/systemd/system/
systemdsystemunitdir = @SYSTEMD_SYSTEMUNITDIR@
systemdsystemunit_DATA = data/cloud-init-firstboot.service data/cloud-init.service
systemdsystemunit_DATA = data/cloud-init.service

systemdsystemunit-install-local:
mkdir -p $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/
ln -sf ../cloud-init.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/cloud-init.service
ln -sf ../cloud-init-firstboot.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/cloud-init-firstboot.service

install-data-local: systemdsystemunit-install-local

systemdsystemunit-uninstall-local:
rm -f $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/cloud-init.service
rm -f $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/cloud-init-firstboot.service

uninstall-local: systemdsystemunit-uninstall-local
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ AM_INIT_AUTOMAKE([foreign -Wall -Werror -Wno-portability silent-rules subdir-obj
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_FILES([Makefile
tests/Makefile
data/cloud-init-firstboot.service
data/cloud-init.service])
AC_CONFIG_HEADERS([config.h])

Expand Down
19 changes: 0 additions & 19 deletions data/cloud-init-firstboot.service.in

This file was deleted.

3 changes: 1 addition & 2 deletions data/cloud-init.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ After=local-fs.target network.target
Before=sshd.service sshd-keygen.service
Requires=network.target
Wants=local-fs.target sshd.service sshd-keygen.service
ConditionFirstBoot=no

[Service]
Type=oneshot
ExecStart=@prefix@/bin/cloud-init --fix-disk --metadata
ExecStart=@prefix@/bin/cloud-init --fix-disk --metadata --user-data-once
RemainAfterExit=yes
TimeoutSec=0

Expand Down

0 comments on commit a819740

Please sign in to comment.