Diff for /elwix/config/etc/default/rc.cfg between versions 1.3.2.16 and 1.3.2.19

version 1.3.2.16, 2017/10/08 00:05:37 version 1.3.2.19, 2017/10/08 20:31:11
Line 9  CFG_NAND_MAP="/dev/ada0g" Line 9  CFG_NAND_MAP="/dev/ada0g"
 CFG_NAND_SIZE=524288  CFG_NAND_SIZE=524288
   
 ELWIX2="/dev/ufs/elwix2"  ELWIX2="/dev/ufs/elwix2"
   ELWIX="/dev/ufs/elwix"
   
 UPGRADE_GPIO_PINS="1 2 3"  UPGRADE_GPIO_PINS="1 2 3"
   
Line 103  case "$1" in Line 104  case "$1" in
                 ;;                  ;;
         pkg2cf)          pkg2cf)
                 echo "ELWIX setup new pkg location on CF at $PKGCF"                  echo "ELWIX setup new pkg location on CF at $PKGCF"
                if ! mount | grep "${CFDIR}"; then                if ! mount | grep "${CFDIR}" >/dev/null 2>&1; then
                         echo "Skip pkg2cf setup, because CF partition isn't mounted ..."                          echo "Skip pkg2cf setup, because CF partition isn't mounted ..."
                         exit 1                          exit 1
                 fi                  fi
Line 142  case "$1" in Line 143  case "$1" in
         boot2)          boot2)
                 echo "ELWIX setup boot from second image"                  echo "ELWIX setup boot from second image"
                 if [ -c $ELWIX2 ]; then                  if [ -c $ELWIX2 ]; then
                           if mount | grep "${ELWIX2} " >/dev/null 2>&1; then
                                   die "You already booted from backup image! Skip changing image ..."
                           fi
   
                         cfger -o /tmp/loader.conf.local.tmp -c "Edit by /etc/rc.cfg" \                          cfger -o /tmp/loader.conf.local.tmp -c "Edit by /etc/rc.cfg" \
                                 -JSs currdev /boot/loader.conf.local "\"disk0f:\""                                  -JSs currdev /boot/loader.conf.local "\"disk0f:\""
                         cfexec cp /tmp/loader.conf.local.tmp /boot/loader.conf.local                          cfexec cp /tmp/loader.conf.local.tmp /boot/loader.conf.local
Line 156  case "$1" in Line 161  case "$1" in
                 ;;                  ;;
         boot)          boot)
                 echo "ELWIX setup boot from main image"                  echo "ELWIX setup boot from main image"
                cfger -o /tmp/loader.conf.local.tmp -c "Edit by /etc/rc.cfg" \                if mount | grep "${ELWIX2} " >/dev/null 2>&1; then
                        -JSs currdev /boot/loader.conf.local "\"disk0a:\""                        mount ${ELWIX} /mnt
                cfexec cp /tmp/loader.conf.local.tmp /boot/loader.conf.local
                if [ $? -eq 127 ]; then                        cfger -o /tmp/loader.conf.local.tmp -c "Edit by /etc/rc.cfg" \
                        cp /tmp/loader.conf.local.tmp /boot/loader.conf.local                                -JSs currdev /mnt/boot/loader.conf.local "\"disk0a:\""
                         cp /tmp/loader.conf.local.tmp /mnt/boot/loader.conf.local
                         rm -f /tmp/loader.conf.local.tmp
 
                         umount /mnt
                 else
                         die "You already booted from main image! Skip changing image ..."
                 fi                  fi
                 rm -f /tmp/loader.conf.local.tmp  
                 echo "ELWIX boot setup complete."                  echo "ELWIX boot setup complete."
                 ;;                  ;;
           test_setup)
                   echo "ELWIX test setup boot sequence"
                   ln -sf /etc/rc.t /etc/rc.S
                   cp /etc/rc.s/*.run /etc/rc.t
                   cat >/etc/rc.t/999.test_setup.run <<__EOF
   #!/bin/sh
   #
   # Test setup boot sequence timer script
   # This script is auto generated from rc.cfg.
   
   # 5min to reboot & restore old state of boot
   sleep 300
   reboot
   __EOF
                   chmod +x /etc/rc.t/999.test_setup.run
                   echo "ELWIX test setup activated."
                   echo "WARNING:: Next one load of ELWIX will be executing under test setup!"
                   ;;
         *)          *)
                echo "Missing parameter - available options are (load | save | erase | backup | restore | upgrade | pkg_load | pkg_save | pkg2cf | boot2 | boot)"                echo "Missing parameter - available options are :"
                 echo "   load | save | erase | backup | restore | upgrade | "
                 echo "   pkg_load | pkg_save | pkg2cf | boot2 | boot | test_setup "
                 ;;                  ;;
 esac  esac
   

Removed from v.1.3.2.16  
changed lines
  Added in v.1.3.2.19


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>