Add Makefile target to generate man page
This commit is contained in:
Родитель
bad888c69b
Коммит
21fd8756f2
7
Makefile
7
Makefile
|
@ -17,6 +17,10 @@ clean:
|
|||
|
||||
.PHONY: install
|
||||
install: all
|
||||
ifneq (,$(wildcard az-hibernate-agent.1))
|
||||
install -m 0755 -d $(DESTDIR)/usr/share/man/man1/
|
||||
install -m 0644 az-hibernate-agent.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
|
||||
|
@ -26,3 +30,6 @@ install: all
|
|||
indent:
|
||||
clang-format az-hibernate-agent.c > indented.c
|
||||
mv indented.c az-hibernate-agent.c
|
||||
|
||||
az-hibernate-agent.1: README.md
|
||||
pandoc -f markdown -s -t man README.md -o az-hibernate-agent.1
|
||||
|
|
63
README.md
63
README.md
|
@ -1,6 +1,21 @@
|
|||
# az-hibernate-agent
|
||||
---
|
||||
title: az-hibernate-agent
|
||||
section: 1
|
||||
header: Azure VM Agents
|
||||
footer: az-hibernate-agent 1.0
|
||||
date: June 29, 2021
|
||||
---
|
||||
|
||||
This agent sets up a VM for hibernation.
|
||||
|
||||
# NAME
|
||||
az-hibernate-agent - sets up a VM for hibernation
|
||||
|
||||
# SYNOPSIS
|
||||
**az-hibernate-agent**
|
||||
|
||||
# DESCRIPTION
|
||||
**az-hibernate-agent** 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
|
||||
larger than the total amount of RAM available for the VM, ensuring it has no holes
|
||||
|
@ -8,10 +23,12 @@ and isn't fragmented, and setting up parameters for the currently-running kernel
|
|||
(so the VM can be hibernated as soon as the set up is complete), and for next boots
|
||||
(so that the VM can be resumed).
|
||||
|
||||
No command-line parameters exist. The tool is fully automatic. It comes
|
||||
with a [systemd](https://systemd.io/) unit file set up as a "simple" service, which can be started
|
||||
on every system boot. If the system has been properly set up, the tool will
|
||||
be completely finished almost instantaneously, not impacting boot time.
|
||||
On Hyper-V virtual machines, it'll also ensure that proper udev rules
|
||||
are set in place so that the machine can hibernate when receiving a
|
||||
command from the host. In addition, it'll install systemd hooks to
|
||||
track hibernation success, failures, and cold-boot scenarios, and store
|
||||
them in the system log.
|
||||
|
||||
|
||||
It currently only fully supports distributions with GRUB2 as the bootloader (e.g.
|
||||
those with `/etc/default/grub` as part of its configuration file), and those using
|
||||
|
@ -27,13 +44,33 @@ build the .deb package, one can use the provided `build.sh` script in the
|
|||
build Debian packages have been installed, will perform all necessary steps
|
||||
to output a file that can be installed via `dpkg`.
|
||||
|
||||
Pull requests improving the tool are greatly appreciated. Please refer to
|
||||
the `CONTRIBUTING.md` file located in this repository for more information, including
|
||||
a link to the Microsoft Open Source Code of Conduct document.
|
||||
# OPTIONS
|
||||
No command-line parameters exist. The tool is fully automatic, and
|
||||
will exit when set up has been completed.
|
||||
It can be safely executed on every boot, without impacting boot time.
|
||||
|
||||
# RETURN VALUE
|
||||
The tool will return 0 on success, and 1 on failure.
|
||||
|
||||
# AUTHORS
|
||||
Written by [Leandro Pereira](mailto:leandro.pereira@microsoft.com).
|
||||
|
||||
# BUGS
|
||||
[Submit bug reports online](https://github.com/microsoft/az-hibernate-agent/issues).
|
||||
|
||||
# SEE ALSO
|
||||
[Full source code is available](https://github.com/microsoft/az-hibernate-agent/).
|
||||
|
||||
# NOTES
|
||||
Pull requests improving the tool are greatly appreciated. Please refer
|
||||
to the `CONTRIBUTING.md` file located in the source repository for more
|
||||
information, including a link to the Microsoft Open Source Code of
|
||||
Conduct document.
|
||||
|
||||
Trademarks This project may contain trademarks or logos for projects,
|
||||
products, or services. Authorized use of Microsoft trademarks or logos is
|
||||
subject to and must follow [Microsoft’s Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of
|
||||
Microsoft trademarks or logos in modified versions of this project must not
|
||||
cause confusion or imply Microsoft sponsorship. Any use of third-party
|
||||
trademarks or logos are subject to those third-party’s policies.
|
||||
subject to and must follow [Microsoft’s Trademark & Brand
|
||||
Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
|
||||
Use of Microsoft trademarks or logos in modified versions of this project
|
||||
must not cause confusion or imply Microsoft sponsorship. Any use of
|
||||
third-party trademarks or logos are subject to those third-party’s policies.
|
||||
|
|
Загрузка…
Ссылка в новой задаче