Package: flashybrid
Version: 0.15+nmu2
Severity: important

Fix fh-sync script in flashybrid debian/lenny package.

fh-sync fails to save changes in the folders except /
Because mountrw remounts only / folder.

We dont't need to remount /. But we have to remount in rw mode
every folder from config file (.fh-config-ramstore) before write
and remount in ro mode after. mountrw and mountro scripts are useless now.

Based on original work by: Kirill Smelkov <[EMAIL PROTECTED]>
Signed-off-by: Dmitry Gryazin <[EMAIL PROTECTED]>
Signed-off-by: Kirill Smelkov <[EMAIL PROTECTED]>

--- /sbin/fh-sync 2008-12-09 14:18:25.000000000 +0300
+++ /sbin/fh-sync 2008-12-09 14:30:41.000000000 +0300
@@ -51,8 +51,6 @@
 fi

 # Copy data to flash.
-# Remount the flash read-write so the copies to it will work.
-mountrw
 RAMSTORAGE=$RAMMOUNT/.fh-config-ramstore

 if [ ! -f $RAMSTORAGE ]; then
@@ -65,11 +63,15 @@
                if [ "$VERBOSE" = "yes" ]; then
                        echo -n "Synchronizing $dir"
                fi
-               
+
+               # Remount every $dir.flash read-write so that copying to it 
will work.
+               mount -o remount,rw $RAMMOUNT/$dir.flash/
                # rsync is used to avoid churning the flash
                # unnecessarily. The trailing slashes are very
                # important..
                rsync --delete -a $RAMMOUNT/$dir/ $RAMMOUNT/$dir.flash/
+               # Remount every $dir.flash read-only after copy.
+               mount -o remount,rw $RAMMOUNT/$dir.flash/

                if [ "$VERBOSE" = "yes" ]; then
                        echo "."
@@ -80,4 +82,3 @@
 echo "done."

 sync
-mountro

----end----


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages flashybrid depends on:
ii  debconf [debconf-2.0]         1.5.24     Debian configuration management sy
ii  rsync                         3.0.3-2    fast remote file copy program (lik

flashybrid recommends no packages.

flashybrid suggests no packages.

-- debconf information excluded



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to