-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling hibernation-setup-tool, hibernate and resume services #7
Open
ishaansehgal99
wants to merge
29
commits into
main
Choose a base branch
from
dev/t-isehgal/link-bug
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
d799ef4
Enabled service
ishaansehgal99 4551a79
Ensure directories created and files linked for service to run
ishaansehgal99 630be4f
Added optional arugments and permissions for tool and service file
ishaansehgal99 b70ad46
Delete
ishaansehgal99 8042081
Corrected link error. Named file
ishaansehgal99 361cc48
Ensured file was created not directory
ishaansehgal99 7938c45
Detect hibernate/resume using hooks. Ensure services files enabled an…
ishaansehgal99 9b15002
Cleaned up comments. Simplified check for is cold booted.
ishaansehgal99 7fd4005
Clean
ishaansehgal99 5f41ec3
Merge branch 'main' of https://github.com/microsoft/hibernation-setup…
ishaansehgal99 c1c6676
remove comment
ishaansehgal99 b2f191a
Removed additional conditional
ishaansehgal99 9f31117
Added comment
ishaansehgal99 4816cc8
Added tool and hook prefixes for better logging
ishaansehgal99 88dc86b
Minor logging addition
ishaansehgal99 583269d
Added log_notice log ability
ishaansehgal99 c365ce9
Merge branch 'main' of https://github.com/microsoft/hibernation-setup…
ishaansehgal99 77a73fd
Explicit check nftw succeeds
ishaansehgal99 3100c41
Formatting
ishaansehgal99 f58f229
Added failed hibernation state
ishaansehgal99 3e247ea
Merge branch 'main' of https://github.com/microsoft/hibernation-setup…
ishaansehgal99 ab98b8e
Resolve merge condflicts
ishaansehgal99 c33297f
Renamed enable_systemd_service function
ishaansehgal99 3f29064
Merge branch 'main' of https://github.com/microsoft/hibernation-setup…
ishaansehgal99 9c9a703
Fixed minor formatting
ishaansehgal99 9fe83d8
Added check to prevent re-enabling services if they have been enabled…
ishaansehgal99 d8df3c6
Disabling pre/post hibernate hooks if either fails to enable
ishaansehgal99 42100c1
Ensure prehook is always enabled
ishaansehgal99 6f2c0b1
Code for enabling/disabling post hooks in pre hooks
ishaansehgal99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also usr/lib/systemd/system based on the distro?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Ubuntu /usr/lib and /lib and different directories. On Ubuntu, /usr/lib is a user-based directory to store things that require access to libraries. The /lib folder is the actual place for essential standard libraries. We need to put our services in this directory in order to access the targets we need (hibernate.target) and for systemd to recognize us as a legitimate service.
After testing on Debian, Rhel and CentOS, the /usr/lib and /lib directories are identical for each of them. On each of them lib is a symbolic link pointing to /usr/lib. In other words, /lib and /usr/lib go to the same place.
/lib is preferred because it includes ubuntu and so works on all distros.
Additional testing: On Debian tool executes without any issues.
However, Rhel has the additional challenges of not having enough space on root "/" partition no matter how much space it's created with. This causes the free space check to prevent tool from running, and if that check is removed, it causes insufficient space error upon allocating hibfile.