summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/resource/getconfig.phtml
blob: aec9b1fa19c225cb7e67d2ef782088776d9d896d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?if ($this->usb): ?>
modprobe usb_storage
echo -n 'Mounting OpenSLX-Stick:'; 
while [ ! -e /dev/sdb1 ] do 
	usleep 500000 
	mdev -s
	echo -n . 
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
		mkdir -p '/mnt/media/openslx-stick/home/'
		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?>'
	fi
else 
	chroot /mnt useradd -d '/home/<?=$this->loginname?>' -m -s '/bin/bash' -p '<?=$this->password?>' '<?=$this->loginname?>'
fi 
		
<? 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; ?>