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.
This commit is contained in:
parent
2ed1e7f1cb
commit
0b5525d2dd
@ -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")"
|
||||
|
Reference in New Issue
Block a user