summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/controllers/ResourceController.php4
-rw-r--r--application/modules/user/controllers/ConfigController.php1
-rw-r--r--setup/pbs.sql8
3 files changed, 10 insertions, 3 deletions
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php
index 8d52348..dd2919a 100644
--- a/application/controllers/ResourceController.php
+++ b/application/controllers/ResourceController.php
@@ -396,7 +396,7 @@ class ResourceController extends Zend_Controller_Action
$tmp_conf = "../resources/config/$hash";
mkdir($tmp_conf ,0777, true);
exec("tar -C $tmp_conf -xf ../resources/bootos/$bootosID/config/default.tgz",$restul);
- exec("tar -C $tmp_conf/rootfs/ -xf ../resources/config/etc.tgz");
+ //exec("tar -C $tmp_conf/rootfs/ -xf ../resources/config/etc.tgz");
$username = '';
$userpassword = '';
@@ -436,7 +436,7 @@ class ResourceController extends Zend_Controller_Action
if($loginname != '' && $password != ''){
// if($user->getHometypeID() == 1)
-// //exec("echo 'if [ -d /media/openslx-stick ]; then \n\t if [ ! -d /media/openslx-stick/home/".$loginname." ]; then \n\t\t chroot /mnt useradd -d ".$homepath." -m -s /bin/bash -p '".escapeshellarg("'".$password."'").' ".$loginname." \n\t else \n\t\t chroot /mnt useradd -d ".$homepath." -s '/bin/bash' -p '".$password."' ".$loginname." \n\t fi \n else \n\t chroot /mnt useradd -d /home/".$loginname." -m -s '/bin/bash' -p '".$password."' ".$loginname." \n fi' >> $tmp_conf/initramfs/postinit.local");
+// //exec("echo 'if [ -d /media/openslx-stick ]; then \n\t if [ ! -d '".escapeshellarg("'"./media/openslx-stick/home/".$loginname."'")."' ]; then \n\t\t chroot /mnt useradd -d '".escapeshellarg("'".$homepath."'")."' -m -s /bin/bash -p '".escapeshellarg("'".$password."'").' ".$loginname." \n\t else \n\t\t chroot /mnt useradd -d ".$homepath." -s '/bin/bash' -p '".$password."' ".$loginname." \n\t fi \n else \n\t chroot /mnt useradd -d /home/".$loginname." -m -s '/bin/bash' -p '".$password."' ".$loginname." \n fi' >> $tmp_conf/initramfs/postinit.local");
// else
exec("echo 'chroot /mnt useradd -d '".escapeshellarg("'".$homepath."'")."' -m -s /bin/bash -p '".escapeshellarg("'".$password."'")."' '".escapeshellarg("'".$loginname."'")."'' >> $tmp_conf/initramfs/postinit.local",$restul);
}
diff --git a/application/modules/user/controllers/ConfigController.php b/application/modules/user/controllers/ConfigController.php
index eca5d54..9e324c4 100644
--- a/application/modules/user/controllers/ConfigController.php
+++ b/application/modules/user/controllers/ConfigController.php
@@ -262,6 +262,7 @@ class user_ConfigController extends Zend_Controller_Action
foreach($this->view->userlist as $user){
$user->setHometypeID("[".$user->getHometypeID()."] ".$hometypeMapper->find($user->getHometypeID())->getName());
}
+
}
public function adduserAction(){
diff --git a/setup/pbs.sql b/setup/pbs.sql
index d2bdeda..6d5dbb3 100644
--- a/setup/pbs.sql
+++ b/setup/pbs.sql
@@ -119,7 +119,7 @@ ALTER TABLE `pbs_membership`
ADD CONSTRAINT `pbs_membership_ibfk_3` FOREIGN KEY (`roleID`) REFERENCES `pbs_role` (`roleID`) ON DELETE CASCADE;
CREATE TABLE IF NOT EXISTS `pbs_hometype` (
- `hometypeID` int(11) NOT NULL AUTO_INCREMENT,
+ `hometypeID` int(11) NOT NULL,
`name` varchar(30) NOT NULL,
PRIMARY KEY (`hometypeID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;
@@ -379,6 +379,12 @@ INSERT INTO `pbs_filtertype` (`filtertypeID`, `filtertypename`) VALUES
(10, 'Weekday'),
(11, 'Date');
+-- Adding hometype
+INSERT INTO `pbs_hometype` (`hometypeID`, `name`) VALUES
+(0, 'standard'),
+(1, 'usbstick'),
+(2, 'custom path');
+
-- Insert rightcategorys
INSERT INTO `pbs_rightcategory` (`rightcategoryID`, `title`) VALUES
(1, 'Person'),