Ensure mount/unmount skips 'noauto' entries

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2025-12-07 09:38:11 +01:00
1 parent fee38d4359
commit 24f0cee49a
2 files changed
+15

No files matched your search

+5
View File
@@ -187,6 +187,11 @@ static void fs_swapoff(void)
if (strcmp(mnt->mnt_type, MNTTYPE_SWAP))
continue;
if (hasmntopt(mnt, "noauto")) {
dbg("Skipping swap %s, marked noauto", mnt->mnt_fsname);
continue;
}
snprintf(cmd, sizeof(cmd), "swapoff %s", mnt->mnt_fsname);
run_interactive(cmd, "Disabling swap %s", mnt->mnt_fsname);
}