#!/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 /