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