TIVI-803: Remove the toyota-ui postscript stuff that not needed.
[profile/ivi/image-configurations.git] / custom / scripts / ivi-2.0-symlinks.post
1 # customize the slp-common post script  
2
3 echo 'kickstart post script start'
4
5 # to make udev happy
6 ln -sf /bin/busybox /sbin/blkid
7
8 # where in the world is xinitrc?
9 ln -sf /etc/X11/xinitrc /usr/etc/X11/xinitrc
10
11 # inittab hack to fix console - UI switching
12 sed -ri 's/--noclear tty1/tty3/' /etc/inittab
13 sed -ri 's/tty2/tty4/' /etc/inittab
14
15 # modprobe fuse for sqlfs-mount
16 /bin/sed -i "3i /sbin/modprobe fuse || :" /etc/rc.d/init.d/sqlfs-mount 
17
18 if [ -d /etc/init.d ]; then
19     cp /etc/init.d/* /etc/rc.d/init.d/ -rdf
20 fi
21 rm -rf /etc/init.d*
22 ln -sf /etc/rc.d/init.d /etc/init.d
23
24 rm -rf /etc/localtime  
25 ln -sf /opt/etc/localtime /etc/localtime  
26
27 # Without this line the rpm doesn't get the architecture right.
28 # echo -n 'armv7l-tizen-linux' > /etc/rpm/platform
29 > /etc/rpm/platform
30
31 ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
32 ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
33 ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
34
35 pkg_initdb
36
37 INITDB=1 ail_initdb
38
39 # ims-service domain setting
40 RESULT=`grep "192.168.0.163 config.45001.rcse" /etc/hosts`  
41 if [ -z "$RESULT" ]; then  
42     echo "Set domain for auto configuration"  
43     echo "192.168.0.163 config.45001.rcse" >> /etc/hosts  
44 else  
45     echo "Already setted domain for test auto configuration"  
46 fi  
47 # ims-service domain setting
48
49 cat > /usr/bin/press << EOF
50 #!/bin/sh
51
52 JUNK="SLP"
53
54 [ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1"
55
56 echo "Press return key to stop scripts"
57 read -t \$TIMEOUT JUNK
58 exit \$?
59 EOF
60 chmod +x /usr/bin/press
61
62 ln -s /opt/etc/X11/xkb /usr/share/X11
63 ln -s /home/app /opt/home/app
64 ln -s /home/developer /opt/home/developer
65
66 echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev
67
68 rm -rf /usr/share/man
69 rm -rf /usr/share/doc
70
71 ldconfig
72
73 mkdir -p /opt/var/lib/dbus
74
75 rm -f /var/lib/rpm/__db*
76 mv -f /var/lib/rpm /opt/var/lib/ 
77 ln -sf /opt/var/lib/rpm /var/lib/rpm
78 rpmdb --rebuilddb
79
80 if [ -e /usr/bin/build-backup-data.sh ]; then
81            /usr/bin/build-backup-data.sh
82 fi