Guest User

Untitled

a guest
Jan 16th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. # See if there is any config to restore
  2.  
  3. try_dev() {
  4. echo mknod /dev/$1 b $2 $3
  5. # mount /dev/$1 /mnt -o ro
  6. # next if error
  7. # for j in $mnt/conf.d/*.tar.gz
  8. # tar xf $j etc
  9. # for j in $mnt/conf.d/*.sh
  10. # source $j
  11. # umount /mnt
  12. }
  13.  
  14. mount -t proc proc /proc
  15.  
  16. cat /proc/partitions | while read major minor size name x; do
  17. case $name in
  18. sd*[0-9]|mmcblk*p*)
  19. echo Checking for config files on $name
  20. try_dev $name $major $minor
  21. ;;
  22. esac
  23. done
Add Comment
Please, Sign In to add comment