Annotation of loncom/build/loncapaautoupgrade, revision 1.3

1.1       harris41    1: #!/usr/bin/perl
                      2: 
                      3: # loncapaautoupgrade
                      4: 
                      5: # This tool does "all the things" to auto update a system.
                      6: # Use with extreme caution so that you do not lose your
                      7: # work.
                      8: 
                      9: # Scott Harrison, 10/25/2000
                     10: 
                     11: use strict;
                     12: 
                     13: # Download most recent LON-CAPA RPM
                     14: 
1.2       harris41   15: print `/usr/bin/lynx -source http://install.lon-capa.org/3.1/loncapafiles/LON-CAPA-base-3.1-1.i386.rpm > /tmp/LON-CAPA-base-3.1-1.i386.rpm`;
1.1       harris41   16: 
                     17: # Stop LON-CAPA
                     18: 
1.3     ! harris41   19: print "Stopping LON-CAPA and Apache\n";
        !            20: system("/etc/rc.d/init.d/loncontrol stop");
1.1       harris41   21: 
                     22: # Update downloaded RPM
                     23: 
1.2       harris41   24: print `/bin/rpm -Uvh --force /tmp/LON-CAPA-base-3.1-1.i386.rpm`;
1.1       harris41   25: 
                     26: # Restore configuration values
                     27: 
1.2       harris41   28: print `/usr/sbin/loncaparestoreconfigurations`;
1.1       harris41   29: 
                     30: # Start LON-CAPA
                     31: 
1.3     ! harris41   32: print "Starting LON-CAPA and Apache (be patient please)\n";
        !            33: system("/etc/rc.d/init.d/loncontrol start");
1.1       harris41   34: 
                     35: # Verify base files and packages
                     36: 
1.2       harris41   37: print `/usr/sbin/loncapaverify`;
1.1       harris41   38: 
                     39: # Remove downloaded RPM
                     40: 
1.2       harris41   41: print `/bin/rm -f /tmp/LON-CAPA-base-3.1-1.i386.rpm`;
1.1       harris41   42: 

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