Subversion-Projekte lars-tiefland.openvz_admin

Revision

Revision 44 | Revision 51 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 44 Revision 48
Zeile 151... Zeile 151...
151
			$dist=$d->toArray();
151
			$dist=$d->toArray();
152
			$d_name=$dist["dist_name"];
152
			$d_name=$dist["dist_name"];
153
			$this->dist=$d_name;
153
			$this->dist=$d_name;
154
			$d_template=$dist["template"];
154
			$d_template=$dist["template"];
155
			$db->beginTransaction();
155
			$db->beginTransaction();
156
			$sql="INSERT into vservers (v_id, hn_id, v_name, v_dist) VALUES ($this->v_id, $this->hn_id, '$this->name', $this->dist)";
156
			$sql="INSERT into vservers (v_id, hn_id, v_name, v_dist) VALUES ($this->v_id, $this->hn_id, '$this->name', $this->dist_id)";
157
			$res=$db->query($sql);
157
			$res=$db->query($sql);
158
			if(!PEAR::isError($res))
158
			if(!PEAR::isError($res))
159
			{
159
			{
160
				$cmd="ssh root@mainframe vzctl create $this->v_id --hostname $v_name --ostemplate /vz/template/cache/$d_template.tar.gz --config vps.$d_name --ipadd $ip";
160
				$cmd="ssh root@mainframe vzctl create $this->v_id --hostname $v_name --ostemplate /vz/template/cache/$d_template.tar.gz --config vps.$d_name --ipadd $ip";
161
				exec($cmd,$out,$ret);
161
				exec($cmd,$out,$ret);