copy activated module to storage (memory) before activation
parent
09cb84bda4
commit
6e3ec50c36
22
tools/slax
22
tools/slax
|
|
@ -73,17 +73,21 @@ activate()
|
||||||
usage "file not found $SB"
|
usage "file not found $SB"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check if file is in aufs union - if yes, move outside
|
# copy the module to storage dir so it can be activated from there
|
||||||
if [ -r "$LIVE/changes/$SB" ]; then
|
TGT="$(get_bundle_storage_dir)"
|
||||||
TGT="$(get_bundle_storage_dir)"
|
|
||||||
echo "File stored inside AUFS filesystem couldn't be activated, moving to $TGT, then activating from there"
|
if [ -r $TGT/$BAS ]; then
|
||||||
mv -n "$SB" "$TGT/$BAS"
|
die "File exists: $TGT/$BAS"
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
die "Error moving file to $TGT/$BAS. Not enough space or target already exists"
|
|
||||||
fi
|
|
||||||
SB="$TGT/$BAS"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cp -n "$SB" "$TGT/$BAS"
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
die "Error copying file to $TGT/$BAS. Not enough space?"
|
||||||
|
fi
|
||||||
|
|
||||||
|
SB="$TGT/$BAS"
|
||||||
|
|
||||||
# check if this particular file is already activated
|
# check if this particular file is already activated
|
||||||
if print_branches | cut -f 2 | fgrep -q "$SB"; then
|
if print_branches | cut -f 2 | fgrep -q "$SB"; then
|
||||||
exit
|
exit
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue