---
 check.d/check_basicfilesystems   | 15 +++++++++++---
 commit.d/format_basicfilesystems | 45 +++++++++-------------------------------
 debian/changelog                 |  2 ++
 debian/control                   |  2 +-
 4 files changed, 25 insertions(+), 39 deletions(-)

diff --git a/check.d/check_basicfilesystems b/check.d/check_basicfilesystems
index 0684ec7..5d232c3 100755
--- a/check.d/check_basicfilesystems
+++ b/check.d/check_basicfilesystems
@@ -29,10 +29,19 @@ for dev in $DEVICES/*; do
                        db_subst $template TYPE "$RET"
                        db_subst $template PARTITION "$num"
                        db_subst $template DEVICE $(humandev $(cat device))
-                       name_progress_bar $template
-                       open_dialog CHECK_FILE_SYSTEM $id
-                       read_line status
+                       open_dialog PARTITION_INFO $id
+                       read_line x1 x2 x3 x4 x5 device x6
                        close_dialog
+                       db_progress START 0 1 partman/text/please_wait
+                       db_progress INFO $template
+                       if log-output -t partman --pass-stdout \
+                           dosfsck -n $device >/dev/null; then
+                           status=good
+                       else
+                           status=failed
+                       fi
+                       db_progress STOP    
+
                        if [ "$status" != good ]; then
                                db_subst partman-basicfilesystems/check_failed 
TYPE "$filesystem"
                                db_subst partman-basicfilesystems/check_failed 
PARTITION "$num"
diff --git a/commit.d/format_basicfilesystems b/commit.d/format_basicfilesystems
index 2b24dee..8724526 100755
--- a/commit.d/format_basicfilesystems
+++ b/commit.d/format_basicfilesystems
@@ -61,44 +61,19 @@ for dev in $DEVICES/*; do
                                        read_line status
                                        close_dialog
                                        sync
+
+                           fat16|fat32)
+                               db_progress START 0 3 partman/text/formatting
+                               db_progress INFO $template
+                               db_progress SET 1
+                               if log-output -t partman --pass-stdout \
+                                   mkfs.$filesystem $device >/dev/null; then
+                                   status=OK
                                else
-                                       status=failed
-                               fi
-                               if [ "$status" != OK ]; then
-                                       db_progress START 0 3 
partman/text/formatting
-                                       db_progress INFO $template
-                                       db_progress SET 1
-                                       if log-output -t partman --pass-stdout \
-                                          mkfs.ext2 $device $options 
>/dev/null; then
-                                               sync
-                                               status=OK
-                                       else
-                                               status=failed
-                                       fi
-                                       db_progress STOP
+                                   status=failed
                                fi
-                               if [ "$status" = OK ]; then
-                                       label=''
-                                       if [ -f $id/label ]; then
-                                               label=$(cat $id/label | \
-                                                       sed 
's/\(................\).*/\1/g')
-                                       fi
-                                       if [ "$label" ]; then
-                                               log-output -t partman 
--pass-stdout \
-                                                       tune2fs -L "$label" 
$device >/dev/null
-                                       fi
-                                       if [ -f $id/reserved_for_root ]; then
-                                               log-output -t partman 
--pass-stdout \
-                                                       tune2fs -m $(cat 
$id/reserved_for_root) $device >/dev/null
-                                       fi
-                               fi
-                               ;;
-                           fat16|fat32)
-                               name_progress_bar $template
-                               open_dialog CREATE_FILE_SYSTEM $id $filesystem
-                               read_line status
-                               close_dialog
                                sync
+                               db_progress STOP    
                                ;;
                        esac
 
diff --git a/debian/changelog b/debian/changelog
index be32c03..8a8fc5b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ partman-basicfilesystems (91) UNRELEASED; urgency=low
   * Use only mkswap instead of parted to format swap, since this is no
     longer supported in parted3.
   * Remove check_swap, as there is no such thing as fscking swap
+  * Use dosfstools to format and check fat filesystems rather than
+    libparted.
 
  -- Phillip Susi <ps...@ubuntu.com>  Wed, 12 Feb 2014 15:56:24 -0500
 
diff --git a/debian/control b/debian/control
index f326b28..82f7288 100644
--- a/debian/control
+++ b/debian/control
@@ -12,6 +12,6 @@ Vcs-Git: 
git://anonscm.debian.org/d-i/partman-basicfilesystems.git
 Package: partman-basicfilesystems
 Package-Type: udeb
 Architecture: all
-Depends: ${misc:Depends}, e2fsprogs-udeb, ext2-modules, fat-modules
+Depends: ${misc:Depends}, e2fsprogs-udeb, ext2-modules, fat-modules, 
dosfstools-udeb
 Provides: partman-filesystem
 Description: Add to partman support for ext2, linux-swap, fat16 and fat32
-- 
1.8.3.2


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/1394733567-3479-2-git-send-email-ps...@ubuntu.com

Reply via email to