mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2026-06-21 00:07:16 +03:00
Merge branch 'systemd' into 'main'
Add Systemd init system support Closes #77 See merge request alpine/cloud/tiny-cloud!148
This commit is contained in:
commit
e6ceecadf3
12
Makefile
12
Makefile
@ -5,7 +5,7 @@ MAN1PAGES = docs/imds.1
|
|||||||
MAN5PAGES = docs/tiny-cloud.conf.5 docs/cloud-config.5 docs/alpine-config.5
|
MAN5PAGES = docs/tiny-cloud.conf.5 docs/cloud-config.5 docs/alpine-config.5
|
||||||
MAN8PAGES = docs/tiny-cloud.8
|
MAN8PAGES = docs/tiny-cloud.8
|
||||||
|
|
||||||
SUBPACKAGES = core openrc $(CLOUDS)
|
SUBPACKAGES = core init $(CLOUDS)
|
||||||
|
|
||||||
.PHONY: check install $(SUBPACKAGES)
|
.PHONY: check install $(SUBPACKAGES)
|
||||||
|
|
||||||
@ -31,9 +31,13 @@ core: $(MAN1PAGES) $(MAN5PAGES) $(MAN8PAGES)
|
|||||||
install -Dm755 -t "$(PREFIX)"/usr/sbin \
|
install -Dm755 -t "$(PREFIX)"/usr/sbin \
|
||||||
sbin/tiny-cloud
|
sbin/tiny-cloud
|
||||||
|
|
||||||
openrc:
|
init:
|
||||||
install -Dm755 -t "$(PREFIX)"/etc/init.d \
|
[ $(command -v rc-status) ] && \
|
||||||
dist/openrc/*
|
install -Dm755 -t "$(PREFIX)"/etc/init.d \
|
||||||
|
dist/openrc/*
|
||||||
|
[ $(command -v systemctl) ] && \
|
||||||
|
install -Dm755 -t "$(PREFIX)"/etc/systemd/system \
|
||||||
|
dist/systemd/*
|
||||||
|
|
||||||
$(CLOUDS):
|
$(CLOUDS):
|
||||||
install -Dm644 -t "$(PREFIX)"/usr/lib/tiny-cloud/cloud/$@ \
|
install -Dm644 -t "$(PREFIX)"/usr/lib/tiny-cloud/cloud/$@ \
|
||||||
|
|||||||
10
dist/systemd/tiny-cloud-boot.service
vendored
Normal file
10
dist/systemd/tiny-cloud-boot.service
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Tiny Cloud Bootstrap - boot phase
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=tiny-cloud boot
|
||||||
|
Restart=no
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
11
dist/systemd/tiny-cloud-early.service
vendored
Normal file
11
dist/systemd/tiny-cloud-early.service
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Tiny Cloud Bootstrap - early phase
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=tiny-cloud early
|
||||||
|
Restart=no
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
11
dist/systemd/tiny-cloud-final.service
vendored
Normal file
11
dist/systemd/tiny-cloud-final.service
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Tiny Cloud Bootstrap - final phase
|
||||||
|
After=tiny-cloud-boot.service tiny-cloud-main.service tiny-cloud-early.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=tiny-cloud final
|
||||||
|
Restart=no
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
12
dist/systemd/tiny-cloud-main.service
vendored
Normal file
12
dist/systemd/tiny-cloud-main.service
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Tiny Cloud Bootstrap - main phase
|
||||||
|
After=network.target sshd.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=tiny-cloud main
|
||||||
|
Restart=no
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user