5ad7d40a17c405cad9772a5b08fbb7c41034cd68
[profile/ivi/image-configurations.git] / custom / scripts / ivi-2.0-symlinks.post
1 echo 'kickstart post script start'
2
3 # inittab hack to fix console - UI switching
4 sed -ri 's/--noclear tty1/tty3/' /etc/inittab
5 sed -ri 's/tty2/tty4/' /etc/inittab
6
7
8 if [ -d /etc/init.d ]; then
9     cp /etc/init.d/* /etc/rc.d/init.d/ -rdf
10 fi
11 rm -rf /etc/init.d*
12 ln -sf /etc/rc.d/init.d /etc/init.d
13
14 rm -rf /etc/localtime  
15 ln -sf /opt/etc/localtime /etc/localtime  
16
17 ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
18 ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
19 ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
20
21 pkg_initdb
22
23 INITDB=1 ail_initdb
24 /opt/apps/com.samsung.menu-screen/bin/menuscreen_initdb
25
26 # ims-service domain setting
27 RESULT=`grep "192.168.0.163 config.45001.rcse" /etc/hosts`  
28 if [ -z "$RESULT" ]; then  
29     echo "Set domain for auto configuration"  
30     echo "192.168.0.163 config.45001.rcse" >> /etc/hosts  
31 else  
32     echo "Already setted domain for test auto configuration"  
33 fi  
34 # ims-service domain setting
35
36 cat > /usr/bin/press << EOF
37 #!/bin/sh
38
39 JUNK="SLP"
40
41 [ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1"
42
43 echo "Press return key to stop scripts"
44 read -t \$TIMEOUT JUNK
45 exit \$?
46 EOF
47 chmod +x /usr/bin/press
48
49 ln -s /opt/etc/X11/xkb /usr/share/X11
50
51 echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev
52
53 rm -rf /usr/share/man
54 rm -rf /usr/share/doc
55
56 ldconfig
57
58 mkdir -p /opt/var/lib/dbus
59
60 rm -f /var/lib/rpm/__db*
61 mv -f /var/lib/rpm /opt/var/lib/ 
62 ln -sf /opt/var/lib/rpm /var/lib/rpm
63 rpmdb --rebuilddb
64
65 if [ -e /usr/bin/build-backup-data.sh ]; then
66            /usr/bin/build-backup-data.sh
67 fi
68