I have come up with a sed script:-
Which I run with
Anyone know how I would use it inline with an <<EOF statement rather than an external script file?
Code:
/umount/a\
\
# Attach the root file system and update /etc/passwd\
echo "**** Attaching UBI file system"\
ubiattach /dev/ubi_ctrl -m 2 -O 2048\
if [ $? != 0 ]; then\
echo "**** ERROR - Could not attach UBIFS"\
fi\
mdev -s\
mkdir -p /mnt/ubifs\
\
# sleep a while to allow devices to settle\
sleep 5\
\
echo "**** Mounting root file system"\
mount -t ubifs ubi0 /mnt/ubifs\
\
echo "**** Updating system password file"\
sed -i 's/root:\*:/root:\$1\$3h5WisJ4\$JbJ\/AJORbUw8Mf.LtNVtp\/:/' /mnt/ubifs/etc/shadow\
Which I run with
sed -f sed.scr
Anyone know how I would use it inline with an <<EOF statement rather than an external script file?