-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
OBJS=az-hibernate-agent.o | ||
OBJS=hibernation-setup-tool.o | ||
CFLAGS+=-Os -Wall -Wextra -std=gnu11 -fstack-protector-all -D_FORTIFY_SOURCE=1 | ||
LDFLAGS+=-Wl,-z,relro,-z,now | ||
|
||
%.o: %.c | ||
$(CC) -c $< $(CFLAGS) -o $@ | ||
|
||
az-hibernate-agent: $(OBJS) | ||
hibernation-setup-tool: $(OBJS) | ||
$(CC) $(LDFLAGS) -o $@ $^ | ||
|
||
all: az-hibernate-agent | ||
all: hibernation-setup-tool | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -f $(OBJS) | ||
rm -f az-hibernate-agent | ||
rm -f hibernation-setup-tool | ||
|
||
.PHONY: install | ||
install: all | ||
ifneq (,$(wildcard az-hibernate-agent.1)) | ||
ifneq (,$(wildcard hibernation-setup-tool.1)) | ||
install -m 0755 -d $(DESTDIR)/usr/share/man/man1/ | ||
install -m 0644 az-hibernate-agent.1 $(DESTDIR)/usr/share/man/man1/ | ||
install -m 0644 hibernation-setup-tool.1 $(DESTDIR)/usr/share/man/man1/ | ||
endif | ||
install -m 0755 -d $(DESTDIR)/usr/sbin | ||
install -m 0755 -d $(DESTDIR)/lib/systemd/system/ | ||
install -m 0755 az-hibernate-agent $(DESTDIR)/usr/sbin | ||
install -m 0644 az-hibernate-agent.service $(DESTDIR)/lib/systemd/system | ||
install -m 0755 hibernation-setup-tool $(DESTDIR)/usr/sbin | ||
install -m 0644 hibernation-setup-tool.service $(DESTDIR)/lib/systemd/system | ||
|
||
.PHONY: indent | ||
indent: | ||
clang-format az-hibernate-agent.c > indented.c | ||
mv indented.c az-hibernate-agent.c | ||
clang-format hibernation-setup-tool.c > indented.c | ||
mv indented.c hibernation-setup-tool.c | ||
|
||
az-hibernate-agent.1: README.md | ||
pandoc -f markdown -s -t man README.md -o az-hibernate-agent.1 | ||
hibernation-setup-tool.1: README.md | ||
pandoc -f markdown -s -t man README.md -o hibernation-setup-tool.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
--- | ||
title: az-hibernate-agent | ||
title: hibernation-setup-tool | ||
section: 1 | ||
header: Azure VM Agents | ||
footer: az-hibernate-agent 1.0 | ||
header: System Utilities | ||
footer: hibernation-setup-tool 1.0 | ||
date: June 29, 2021 | ||
--- | ||
|
||
|
||
# NAME | ||
az-hibernate-agent - sets up a VM for hibernation | ||
hibernation-setup-tool - sets up a VM for hibernation | ||
|
||
# SYNOPSIS | ||
**az-hibernate-agent** | ||
**hibernation-setup-tool** | ||
|
||
# DESCRIPTION | ||
**az-hibernate-agent** is a tool that sets up a swap file suitable for | ||
**hibernation-setup-tool** is a tool that sets up a swap file suitable for | ||
hibernation, and sets up the system to enable proper resuming. | ||
|
||
It accomplishes that by creating a swap file in the root directory that's slightly | ||
|
@@ -55,10 +55,10 @@ The tool will return 0 on success, and 1 on failure. | |
Written by [Leandro Pereira](mailto:[email protected]). | ||
|
||
# BUGS | ||
[Submit bug reports online](https://github.com/microsoft/az-hibernate-agent/issues). | ||
[Submit bug reports online](https://github.com/microsoft/hibernation-setup-tool/issues). | ||
|
||
# SEE ALSO | ||
[Full source code is available](https://github.com/microsoft/az-hibernate-agent/). | ||
[Full source code is available](https://github.com/microsoft/hibernation-setup-tool/). | ||
|
||
# NOTES | ||
This program requires superuser privileges to execute. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters