summaryrefslogtreecommitdiffstats
path: root/etc/phpshellsessions
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-08-04 23:59:42 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-08-04 23:59:42 -0600
commit5624039060c831d16bf7422bbfa8659539bd96d8 (patch)
tree15437be32c837faa079090fc632a753f7dbc07ab /etc/phpshellsessions
parentf7ec62f87372966c4954ce90dc58f3f8e4742b1b (diff)
downloadpfsense-5624039060c831d16bf7422bbfa8659539bd96d8.zip
pfsense-5624039060c831d16bf7422bbfa8659539bd96d8.tar.gz
Some minor fixes for gitsync. Don't create these unused directories, and make sure the file system is returned to the read-only state on NanoBSD.
Diffstat (limited to 'etc/phpshellsessions')
-rw-r--r--etc/phpshellsessions/gitsync7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/phpshellsessions/gitsync b/etc/phpshellsessions/gitsync
index 1d95bc3..39c51ce 100644
--- a/etc/phpshellsessions/gitsync
+++ b/etc/phpshellsessions/gitsync
@@ -79,8 +79,6 @@ if($argv[4] == "NOBACKUP")
else
$nobackup = false;
-exec("mkdir -p /root/pfsense/$BRANCHTAG");
-
$found = false;
foreach($branches as $branchname => $branchdesc) {
if($branchname == $branch)
@@ -103,6 +101,7 @@ if(!$found) {
}
if(!$found) {
echo "\nNo valid branch found. Exiting.\n\n";
+ conf_mount_ro();
exit;
}
}
@@ -125,11 +124,13 @@ if(!$command_split[2] && !$argv[3]) {
if($branch == "RESTORE" && $g['platform'] == "pfSense") {
if(!file_exists("/root/cvssync_backup.tgz")) {
echo "Sorry, we could not find a previous CVSSync backup file.\n";
+ conf_mount_ro();
exit();
}
echo "===> Restoring previous CVSSync backup... Please wait...\n";
exec("tar Uxpf /root/cvssync_backup.tgz -C /");
post_cvssync_commands();
+ conf_mount_ro();
exit();
} else {
$nobackup = true; // do not backup embedded, livecd
@@ -145,7 +146,6 @@ if($nobackup == false) {
}
echo "===> Checking out $branch\n";
-exec("mkdir -p /root/pfsense/$branch");
// Git commands for resetting to the specified branch
if($branch == "build_commit") {
@@ -187,6 +187,7 @@ foreach($merge_repos as $merge_repo) {
if($ret <> 0) {
echo "\nMerge failed. Aborting sync.\n\n";
run_cmds($git_cmd);
+ conf_mount_ro();
exit;
}
}
OpenPOWER on IntegriCloud