summaryrefslogtreecommitdiffstats
path: root/share/files/helper
blob: 064a2cb22d5eb6c644edd3a2b879db3b5a2f91bc (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
32
33
34
35
#!/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

sed -i -e 's,messagebus,dbus,g' /etc/passwd
sed -i -e 's,messagebus,dbus,g' /etc/shadow
sed -i -e 's,messagebus,dbus,g' /etc/group

echo "add dummy user"
adduser openslx
passwd openslx

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

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