Mr-MIBonk / M.I.B._More-Incredible-Bash

M.I.B. - More Incredible Bash - The Army knife for Harman MIB 2.x aka MHI2(Q) units
GNU General Public License v2.0
465 stars 53 forks source link

How to replace or restore credentials? #445

Open echefranov opened 2 months ago

echefranov commented 2 months ago

I tried to replace/restore credentials file but it doesn't work. I wrote custom script for it:

mount -uw /net/mmx/fs/sda0/

# Check if the credentials file exists in the destination directory
if [ -e "/net/mmx/ramdisk/credentials" ]; then
    echo "The credentials file has been found in the destination directory and will be overwritten."
    cp -f /net/mmx/fs/sda0/mycreds/credentials /net/mmx/ramdisk/
    echo "Successfully replaced credentials file on MIB device"
else
    echo "The credentials file is not found in the destination directory. Aborting the copying process."
fi

What is wrong? How to replace credentials?

chefranov commented 2 months ago

I see this part of code written by @harman-f https://github.com/Mr-MIBonk/M.I.B._More-Incredible-Bash/blob/main/apps/backup#L326-L338 @harman-f could you help with this?