Commit 96532b5b authored by Mikhail Karpenko's avatar Mikhail Karpenko
Browse files
parents b3e6d2f3 f05c3a2d
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -221,12 +221,12 @@ else if ($cmd=="mount") { // mount media like HDD
	if (isset($_GET['mountpoint']))
	if (isset($_GET['mountpoint']))
		$mountpoint = $_GET['mountpoint'];
		$mountpoint = $_GET['mountpoint'];
	else
	else
		$mountpoint = '/var/hdd';
		$mountpoint = '/mnt/sda1';
	
	
	exec('mkdir '.$mountpoint);
	exec('mkdir '.$mountpoint);
	//exec('mkdir /var/hdd');
	//exec('mkdir /mnt/sda1');
	exec('mount '.$partition." ".$mountpoint);
	exec('mount '.$partition." ".$mountpoint);
	//exec('mount /dev/hda1 /var/hdd');
	//exec('mount /dev/hda1 /mnt/sda1');
	xml_header();
	xml_header();
	echo "<command>".$cmd."</command>";
	echo "<command>".$cmd."</command>";
	echo "<".$cmd.">";
	echo "<".$cmd.">";
@@ -392,7 +392,7 @@ else
			exec('sync');
			exec('sync');
			break;
			break;
		case "file_rename":
		case "file_rename":
			// Now requires full path (like "/var/hdd/test1.mov") for file_old
			// Now requires full path (like "/mnt/sda1/test1.mov") for file_old
			// and either a full path or just a filename for file_new 
			// and either a full path or just a filename for file_new 
			if ((!isset($_GET['file_old'])) || (!isset($_GET['file_new']))) {
			if ((!isset($_GET['file_old'])) || (!isset($_GET['file_new']))) {
				echo "wrong arguments";
				echo "wrong arguments";
@@ -495,7 +495,7 @@ else
			$dir_name = $_GET['name'];
			$dir_name = $_GET['name'];
			if (isset($dir_name) && (($dir_name != "") || ($dir_name != " ")))
			if (isset($dir_name) && (($dir_name != "") || ($dir_name != " ")))
			{
			{
				exec('mkdir /var/hdd/'.$dir_name);
				exec('mkdir /mnt/sda1/'.$dir_name);
				echo "done";
				echo "done";
				break;
				break;
			}
			}
@@ -517,7 +517,7 @@ else
				echo "no HDD mounted";
				echo "no HDD mounted";
			break;
			break;
		case "create_symlink":
		case "create_symlink":
			//exec('ln -s /var/hdd /mnt/flash/html/hdd');
			//exec('ln -s /mnt/sda1 /mnt/flash/html/hdd');
			
			
			if (isset($_GET['mountpoint'])) $mountpoint = $_GET['mountpoint'];
			if (isset($_GET['mountpoint'])) $mountpoint = $_GET['mountpoint'];
			else                            $mountpoint = "/mnt/sda1";
			else                            $mountpoint = "/mnt/sda1";