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