From fcddf282aa61cf6f3d67c337a2c910dc1c2c644a Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 8 Mar 2009 22:57:21 -0400 Subject: [PATCH] Set CODIR early, remove directories as needed --- etc/phpshellsessions/cvssync | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/etc/phpshellsessions/cvssync b/etc/phpshellsessions/cvssync index 8759a4dc9d..96b23f5738 100644 --- a/etc/phpshellsessions/cvssync +++ b/etc/phpshellsessions/cvssync @@ -4,7 +4,10 @@ * Part of the pfSense project pfSsh.php subsystem */ +exec("rm -rf /home/pfsense /root/pfsense"); + $GIT_REPO="http://gitweb.pfsense.org/pfsense/mainline.git"; +$CODIR = "/root/pfsense/"; global $argv; global $command_split; @@ -13,6 +16,7 @@ conf_mount_rw(); echo "\nRemoving downloaded cvssync data, please wait..."; exec("/bin/rm -rf /home/pfsense"); +exec("mkdir -p /home/pfsense"); echo " done.\n"; unlink_if_exists("/tmp/config.cache"); @@ -66,13 +70,6 @@ if($argv[4] == "NOBACKUP") else $nobackup = false; -$CODIR = "/root/pfsense/"; - -// XXX Temporary until we get git under control. -if(is_dir("$CODIR/pfSenseGITREPO")) - exec("rm -rf $CODIR/pfSenseGITREPO"); - - exec("mkdir -p /root/pfsense/$BRANCHTAG"); $found = false;