Re: Bug#757987: kfreebsd: cannot create swap space
reassign 757987 partman-basicfilesystems
found 757987 partman-basicfilesystems/96
tags 757987 + patch
usertags + kfreebsd
partman-basicfilesystems 96 added commit.d/format_swap, which uses
mkswap (a Busybox utility for formatting Linux swap space) for any type
of swap partition.
mkswap, and the whole format_swap script, is of no use to kfreebsd (or
hurd I presume - please correct me if I'm wrong); on kfreebsd we don't
need to format our swap space to use it. This patch exits early from
the script on non-Linux architectures.
I've used $(archdetect) here to be consistent with check.d/ext2_boot;
the limitation is that this doesn't allow for a "linux-*" pattern patch,
so I had to list all (2) of the non-linux architecture prefixes.
I've tested this on kfreebsd-amd64, and also that swap space still gets
mounted when partman is finished.
* Skip commit.d/format_swap on kfreebsd-* and hurd-*, which don't need
to format their swap partitions
diff --git a/commit.d/format_swap b/commit.d/format_swap
index e2dc4b0..dc72032 100755
@@ -1,5 +1,17 @@
+# The mkswap utility only supports Linux swap partitions; skip running
+# the rest of this script on other architectures
+case $ARCH in
+ exit 0
for dev in $DEVICES/*; do