You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
434 B
29 lines
434 B
#!/bin/bash
|
|
|
|
echo === $0
|
|
|
|
lastDisk=$(lsblk -i -n -o PATH | grep '/...$' | tail -n 1)
|
|
|
|
if [ -n "$lastDisk" ]; then
|
|
if file -s $lastDisk | grep -q 'gzip compressed data'; then
|
|
rm -f /etc/vdn/[0-9]*
|
|
tar -C / -xf $lastDisk
|
|
else
|
|
echo >&2
|
|
echo "WARNING : no vdn config partition found !" >&2
|
|
sleep 3
|
|
fi
|
|
fi
|
|
|
|
#sleep 3
|
|
|
|
for i in $(ls /etc/vdn/[0-9]* 2> /dev/null) ; do
|
|
sh $i
|
|
done
|
|
|
|
chmod 755 /
|
|
chown root:root /
|
|
|
|
|
|
|