summaryrefslogtreecommitdiffstats
path: root/application/views/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'application/views/scripts')
-rw-r--r--application/views/scripts/resource/getconfig.phtml31
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