[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#757987: kfreebsd: cannot create swap space



On 22/08/14 14:48, Samuel Thibault wrote:
> hurd uses the same format as Linux, do not disable formatting swap
> there.

Thanks, that's surprising;  glad I asked.  New patch attached.

Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org
  * Skip commit.d/format_swap on kfreebsd-*, whose swap partitions do
    not need to be formatted (Closes: #757987)

diff --git a/commit.d/format_swap b/commit.d/format_swap
index e2dc4b0..dc3ea08 100755
--- a/commit.d/format_swap
+++ b/commit.d/format_swap
@@ -1,5 +1,18 @@
 #!/bin/sh
 
+ARCH="$(archdetect)"
+
+# The mkswap utility only supports Linux-type swap partitions, used
+# on Linux and Hurd;  do not use it on kfreebsd which does need to
+# format swap partitions
+case $ARCH in
+    kfreebsd-*)
+        exit 0
+        ;;
+    *)
+        ;;
+esac
+
 . /lib/partman/lib/base.sh
 
 for dev in $DEVICES/*; do

Reply to: