Take two at modprobe fuse snippet
[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 # modprobe fuse for sqlfs-mount
10 /bin/sed -i "3i /sbin/modprobe fuse || :" /etc/rc.d/init.d/sqlfs-mount 
11
12 echo 'kickstart post script start'
13 if [ -d /etc/init.d ]; then
14     cp /etc/init.d/* /etc/rc.d/init.d/ -rdf
15 fi
16 rm -rf /etc/init.d*
17 ln -sf /etc/rc.d/init.d /etc/init.d
18
19 rm -rf /etc/localtime  
20 ln -sf /opt/etc/localtime /etc/localtime  
21
22 # Without this line the rpm don't get the architecture right.
23 # echo -n 'armv7l-tizen-linux' > /etc/rpm/platform
24 > /etc/rpm/platform
25
26 ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
27 ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
28 ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
29
30 pkg_initdb
31
32 INITDB=1 ail_initdb
33 /opt/apps/com.samsung.menu-screen/bin/menuscreen_initdb
34
35 # ims-service domain setting
36 RESULT=`grep "192.168.0.163 config.45001.rcse" /etc/hosts`  
37 if [ -z "$RESULT" ]; then  
38     echo "Set domain for auto configuration"  
39     echo "192.168.0.163 config.45001.rcse" >> /etc/hosts  
40 else  
41     echo "Already setted domain for test auto configuration"  
42 fi  
43 # ims-service domain setting
44
45 cat > /usr/bin/press << EOF
46 #!/bin/sh
47
48 JUNK="SLP"
49
50 [ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1"
51
52 echo "Press return key to stop scripts"
53 read -t \$TIMEOUT JUNK
54 exit \$?
55 EOF
56 chmod +x /usr/bin/press
57
58 ln -s /opt/etc/X11/xkb /usr/share/X11
59
60 echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev
61
62 rm -rf /usr/share/man
63 rm -rf /usr/share/doc
64
65 ldconfig
66
67 mkdir -p /opt/var/lib/dbus
68
69 rm -f /var/lib/rpm/__db*
70 mv -f /var/lib/rpm /opt/var/lib/ 
71 ln -sf /opt/var/lib/rpm /var/lib/rpm
72 rpmdb --rebuilddb
73
74 if [ -e /usr/bin/build-backup-data.sh ]; then
75            /usr/bin/build-backup-data.sh
76 fi