Signed-off-by: Michael Tremer michael.tremer@ipfire.org --- src/initscripts/system/mountfs | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/src/initscripts/system/mountfs b/src/initscripts/system/mountfs index 81ed729c1..2e2ff0b5b 100644 --- a/src/initscripts/system/mountfs +++ b/src/initscripts/system/mountfs @@ -36,6 +36,11 @@ case "${1}" in boot_mesg "Mounting remaining file systems..." mount -a -O no_netdev &>/dev/null evaluate_retval + + # ExtraHD + boot_mesg "Mounting custom file systems..." + /var/ipfire/extrahd/bin/extrahd.pl mount + evaluate_retval ;;
stop) @@ -45,6 +50,11 @@ case "${1}" in sync && sync evaluate_retval
+ # ExtraHD + boot_mesg "Unmounting custom file systems..." + /var/ipfire/extrahd/bin/extrahd.pl umount + evaluate_retval + boot_mesg "Unmounting all other currently mounted file systems..." umount -a -d -r &>/dev/null evaluate_retval
The system should perform all write operations when sync is called and only return when the write queues are empty.
There is no additional benefit for calling sync again as the buffers should be empty. If data is still being lost, then that is a bug in either the storage device or driver.
As the (re-)boot process is already so slow, I would like to get rid of any unnecessary delays.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org --- src/initscripts/system/mountfs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/initscripts/system/mountfs b/src/initscripts/system/mountfs index 2e2ff0b5b..8975eb02c 100644 --- a/src/initscripts/system/mountfs +++ b/src/initscripts/system/mountfs @@ -45,9 +45,7 @@ case "${1}" in
stop) boot_mesg "Syncing discs..." - sync && sync - sleep 2 - sync && sync + sync evaluate_retval
# ExtraHD
The rewritten version of ExtraHD no longer stores entries in /etc/fstab which is why they have to be removed during the update.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org --- config/rootfiles/core/179/update.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/config/rootfiles/core/179/update.sh b/config/rootfiles/core/179/update.sh index bc8fa28cd..110335d13 100644 --- a/config/rootfiles/core/179/update.sh +++ b/config/rootfiles/core/179/update.sh @@ -24,6 +24,24 @@ . /opt/pakfire/lib/functions.sh /usr/local/bin/backupctrl exclude >/dev/null 2>&1
+migrate_extrahd() { + local dev + local fs + local mp + local rest + + while IFS=';' read -r dev fs mp rest; do + # Make sure mountpoint it set (so that we won't delete + # everything in /etc/fstab if there was an empty line). + if [ -z "${mp}" ]; then + continue + fi + + # Remove the mountpoint from /etc/fstab + sed "/[[:blank:]]${mp////\/}[[:blank:]]/d" -i /etc/fstab + done < /var/ipfire/extrahd/devices +} + core=179
# Remove old core updates from pakfire cache to save space... @@ -61,6 +79,9 @@ ldconfig # Filesytem cleanup /usr/local/bin/filesystem-cleanup
+# Migrate ExtraHD +migrate_extrahd + # Start services /etc/init.d/udev restart /etc/init.d/squid restart