summaryrefslogtreecommitdiffstats
path: root/share/files/helper
blob: ef6a125bb5583e3e37d690bf545f2fe36dbb8c0e (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
28
29
30
31
#!/bin/sh

#TODO
ip link set dev eth0 up
echo enter ip address
read ip
gw=${ip%\.*}.254
ip a a $ip/24 dev eth0

ip route add default via $gw
echo "nameserver 132.230.200.200" >> /etc/resolv.conf

modprobe dnbd3
dnbd3-client 132.230.4.1 12 1 /dev/dnbd0

mount /dev/dnbd0 /mnt

cp /mnt/etc/passwd /etc
cp /mnt/etc/group /etc
cp /mnt/etc/shadow /etc
cp /mnt/etc/ld* /etc

echo "add dummy user"
adduser openslx
passwd openslx

echo "append rootfs"
mount -o remount,append:/mnt /

ldconfig
ln -sf /bin/dash /bin/sh