Some tweaking of post scripts
[profile/ivi/image-configurations.git] / custom / scripts / ivi-2.0-symlinks.post
1 # customize the slp-common post script  
2
3 # to make udev happy
4 ln -sf /bin/busybox /sbin/blkid
5
6 # where in the world is xinitrc?
7 ln -sf /etc/X11/xinitrc /usr/etc/X11/xinitrc
8
9 echo 'kickstart post script start'
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 # Without this line the rpm don't get the architecture right.
20 # echo -n 'armv7l-tizen-linux' > /etc/rpm/platform
21 > /etc/rpm/platform
22
23 ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
24 ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
25 ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
26
27 pkg_initdb
28
29 INITDB=1 ail_initdb
30 /opt/apps/com.samsung.menu-screen/bin/menuscreen_initdb
31
32 # ims-service domain setting
33 RESULT=`grep "192.168.0.163 config.45001.rcse" /etc/hosts`  
34 if [ -z "$RESULT" ]; then  
35     echo "Set domain for auto configuration"  
36     echo "192.168.0.163 config.45001.rcse" >> /etc/hosts  
37 else  
38     echo "Already setted domain for test auto configuration"  
39 fi  
40 # ims-service domain setting
41
42 cat > /usr/bin/press << EOF
43 #!/bin/sh
44
45 JUNK="SLP"
46
47 [ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1"
48
49 echo "Press return key to stop scripts"
50 read -t \$TIMEOUT JUNK
51 exit \$?
52 EOF
53 chmod +x /usr/bin/press
54
55 ln -s /opt/etc/X11/xkb /usr/share/X11
56
57 echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev
58
59 rm -rf /usr/share/man
60 rm -rf /usr/share/doc
61
62 ldconfig
63
64 mkdir -p /opt/var/lib/dbus
65
66 rm -f /var/lib/rpm/__db*
67 mv -f /var/lib/rpm /opt/var/lib/ 
68 ln -sf /opt/var/lib/rpm /var/lib/rpm
69 rpmdb --rebuilddb
70
71 if [ -e /usr/bin/build-backup-data.sh ]; then
72            /usr/bin/build-backup-data.sh
73 fi