Guest User

Untitled

a guest
Feb 28th, 2021
80
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. if [[ $(id -u) -ne 0 ]] ; then echo "Uruchom jako root!" ; exit 1 ; fi
  4.  
  5. opt=$1
  6. case $opt in
  7.     linux)
  8.    
  9.         mount -t auto /dev/sdc1 /home/partimag && /usr/sbin/ocs-sr --ocsroot "/home/partimag/LIN_KOPIA" -q2 -batch -gs -sc -z1p -i 1000000 -sfsck -senc -p choose saveparts $(date "+%Y-%m-%d")-LIN_ARCH-img sdb1 sdb2 && sudo umount /dev/sdc1
  10.         ;;
  11.     windows)
  12.    
  13.         mount -t auto /dev/sdc1 /home/partimag && /usr/sbin/ocs-sr --ocsroot "/home/partimag/WIN10_KOPIA" -q2 -batch -gs -sc -z1p -i 1000000 -sfsck -senc -p choose saveparts $(date "+%Y-%m-%d")-WIN10-img sda1 sda2 sda3 sda4 && sudo umount /dev/sdc1
  14.         ;;
  15.     *)
  16.         exit 0
  17.         ;;
  18. esac
RAW Paste Data