diff options
author | michael pereira | 2011-05-11 15:01:16 +0200 |
---|---|---|
committer | michael pereira | 2011-05-11 15:01:16 +0200 |
commit | e7095bdcf161350e06cdd562c39632d602f02722 (patch) | |
tree | 2be9abbb8f859ecb9b64c5c384053e01c40376a5 /application/views | |
parent | Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff) | |
download | pbs2-e7095bdcf161350e06cdd562c39632d602f02722.tar.gz pbs2-e7095bdcf161350e06cdd562c39632d602f02722.tar.xz pbs2-e7095bdcf161350e06cdd562c39632d602f02722.zip |
ViewScript für config gefixt
Diffstat (limited to 'application/views')
-rw-r--r-- | application/views/scripts/resource/getconfig.phtml | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/application/views/scripts/resource/getconfig.phtml b/application/views/scripts/resource/getconfig.phtml index 0e34b6e..bb5241b 100644 --- a/application/views/scripts/resource/getconfig.phtml +++ b/application/views/scripts/resource/getconfig.phtml @@ -1,7 +1,4 @@ -<?php - if($this->usb == true){ - $this->script =" - +<?if ($this->usb): ?> modprobe usb_storage echo -n 'Mounting OpenSLX-Stick:'; while [ ! -e /dev/sdb1 ] do @@ -12,21 +9,21 @@ done mkdir -p /mnt/media/openslx-stick mount /dev/sdb1 /mnt/media/openslx-stick if [ -d /mnt/media/openslx-stick/boot ]; then - if [ ! -d '/mnt/media/openslx-stick/home/$this->loginname' ]; then + if [ ! -d '/mnt/media/openslx-stick/home/<?=$this->loginname?>' ]; then mkdir -p '/mnt/media/openslx-stick/home/' - chroot /mnt useradd -m -d '$this->homepath' -s /bin/bash -p '$this->password' '$this->loginname' + chroot /mnt useradd -m -d '<?=$this->homepath?>' -s /bin/bash -p '<?=$this->password?>' '<?=$this->loginname?>' else - chroot /mnt useradd -d '$this->homepath' -s '/bin/bash' -p '$this->password' '$this->loginname' + chroot /mnt useradd -d '<?=$this->homepath?>' -s '/bin/bash' -p '<?=$this->password?>' '<?=$this->loginname?>' fi else - chroot /mnt useradd -d '/home/$this->loginname' -m -s '/bin/bash' -p '$this->password' '$this->loginname' -fi \n"; + chroot /mnt useradd -d '/home/<?=$this->loginname?>' -m -s '/bin/bash' -p '<?=$this->password?>' '<?=$this->loginname?>' +fi - }else{ - $this->script = "chroot /mnt useradd -d '$this->homepath' -m -s /bin/bash -p '$this->password' '$this->loginname' \n"; - if($this->autologin == true){ - $this->script .= "chroot /mnt sed -e \"s/AutoLoginEnable=.*/AutoLoginEnable=true/g;\" /etc/kde4/kdm/kdmrc > /tmp/tmpkdmrc - && sed 21iAutoLoginUser='$this->loginname' /tmp/tmpkdmrc > /mnt/etc/kde4/kdm/kdmrc - && rm /tmp/tmpkdmrc \n"; - } - }
\ No newline at end of file +<? else: ?> + chroot /mnt useradd -d '<?=$this->homepath?>' -m -s /bin/bash -p '<?=$this->password?>' '<?=$this->loginname?>' + <?php if($this->autologin):?> + chroot /mnt sed -e \"s/AutoLoginEnable=.*/AutoLoginEnable=true/g;\" /etc/kde4/kdm/kdmrc > /tmp/tmpkdmrc + && sed 21iAutoLoginUser='<?=$this->loginname?>' /tmp/tmpkdmrc > /mnt/etc/kde4/kdm/kdmrc + && rm /tmp/tmpkdmrc + <?php endif;?> +<? endif; ?>
\ No newline at end of file |