Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

F #260: Allow not mounting Swap automatically #259

Closed
wants to merge 2 commits into from
Closed

F #260: Allow not mounting Swap automatically #259

wants to merge 2 commits into from

Conversation

Th0masL
Copy link
Contributor

@Th0masL Th0masL commented Apr 25, 2022

Changes proposed in this pull request:

  • Allow user to provide a Context Variable called DISABLE_SWAP with the value true to prevent the one-context.d scripts to automatically try to mount the Swap file

@Th0masL Th0masL changed the title Add Context Variable to not mount Swap automatically Allow not mounting Swap automatically Apr 25, 2022
Signed-off-by: Thomas Lejeune <[email protected]>
@Th0masL Th0masL changed the title Allow not mounting Swap automatically F #260: Allow not mounting Swap automatically Apr 26, 2022
@Th0masL
Copy link
Contributor Author

Th0masL commented Apr 26, 2022

To address #260

@@ -21,6 +21,10 @@ if [ "$1" != 'local' ] ; then
exit 0
fi

if [ "${DISABLE_SWAP}" == "true" ]; then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use YES, yes, NO, no as the boolean values in the context.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The context parameter DISABLE_SWAP is misleading - swap can still be enabled if there is correct line in /etc/fstab for example - this script is looking for block devices with a type SWAP and mounts them (if on linux) - I think that a better name but still short is IGNORE_SWAP.

@ospalax
Copy link

ospalax commented May 3, 2022

Closed in favor of this PR: #262

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants