From 0b5525d2dd5c0baf2827441163c149c64ec7f9e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Fortuna?= Date: Tue, 21 Jan 2014 16:59:46 +0000 Subject: [PATCH] filesystem: fixed script 'dune' crash on update Crashing occurred when there was no etc/*-saved.ini file. Happens at least for every system that is running for the first time. --- packages/filesystem/fs/etc/rc.d/dune | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/filesystem/fs/etc/rc.d/dune b/packages/filesystem/fs/etc/rc.d/dune index 8f26975..63cbeac 100644 --- a/packages/filesystem/fs/etc/rc.d/dune +++ b/packages/filesystem/fs/etc/rc.d/dune @@ -14,7 +14,9 @@ maybe_upgrade() rm -rf $dune_base/.dune-upgrade && mkdir $dune_base/.dune-upgrade && tar -x -C $dune_base/.dune-upgrade -f $dune_base/dune-*.tar.bz2 && - cp "$dune_base/etc/"*-saved.ini "$dune_base/.dune-upgrade/"dune-*/etc 2> /dev/null && + if [ -f $dune_base/etc/*-saved.ini ]; then + cp "$dune_base/etc/"*-saved.ini "$dune_base/.dune-upgrade/"dune-*/etc 2> /dev/null + fi && rm $dune_base/dune-*.tar.bz2 && for dir in $dune_base/.dune-upgrade/dune-*/*; do d="$(basename "$dir")"