SHARE
TWEET

/usr/bin/fix_ro1.sh

s243a Jun 23rd, 2019 (edited) 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. . /etc/rc.d/PUPSTATE
  3. SAVE_REL="$(echo $PUPSAVE | cut -d',' -f3)"
  4. SAVE_PATH="/initrd/mnt/dev_save$SAVE_REL"
  5.  
  6. if [ -d "$SAVE_PATH" ] ; then
  7.   if [ -d /initrd/pup_ro1 ]; then
  8.      cp -arfv --remove-destination "$SAVE_PATH"
  9.      rm -rf /initrd/pup_ro1
  10.   elif [ -L /initrd/pup_ro1 ]; then
  11.     rm -rf /initrd/pup_ro1
  12.   fi
  13.   if [ ! -L /initrd/pup_ro1 ]; then
  14.     ln -sv "$SAVE_PATH" /initrd/pup_ro1 #for after switch
  15.   fi
  16. fi
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top