TIVI-536: crazy root dir recursion; general re-org and cleanup of post scripts
authorGraydon, Tracy <tracy.graydon@intel.com>
Tue, 26 Mar 2013 00:44:23 +0000 (17:44 -0700)
committerGraydon, Tracy <tracy.graydon@intel.com>
Tue, 26 Mar 2013 00:44:23 +0000 (17:44 -0700)
21 files changed:
custom/scripts/boot-into-ui.post [deleted file]
custom/scripts/cleanup.post [deleted file]
custom/scripts/console-switching.post [new file with mode: 0644]
custom/scripts/copy-initd.post [new file with mode: 0644]
custom/scripts/ims-service.post [new file with mode: 0644]
custom/scripts/inittab.post [deleted file]
custom/scripts/invisi-cursor.post [moved from custom/scripts/cursor-config.post with 92% similarity]
custom/scripts/ivi-2.0-symlinks.post [deleted file]
custom/scripts/ivi-root.post [deleted file]
custom/scripts/keygen.post [new file with mode: 0644]
custom/scripts/links-n-tweaks.post [new file with mode: 0644]
custom/scripts/menu-screen.post [new file with mode: 0644]
custom/scripts/misc-hacks.post [new file with mode: 0644]
custom/scripts/platform-fix.post [new file with mode: 0644]
custom/scripts/rpm.post
custom/scripts/symlink-root.post [deleted file]
custom/scripts/systemd.post [deleted file]
custom/scripts/usb-networking.post
custom/scripts/user-bin-press.post [new file with mode: 0644]
custom/scripts/users.post [deleted file]
ivi/ivi-2.0.yaml

diff --git a/custom/scripts/boot-into-ui.post b/custom/scripts/boot-into-ui.post
deleted file mode 100644 (file)
index 8a95347..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-# this file should be deleted after elegant fix merged
-############################### hacks to get
-# usbnet, udev, ssh, and other stuff
-cat > /etc/rc.d/rc3.d/S01debug << EOF
-
-# udev
-/sbin/udevd --daemon
-/sbin/udevadm trigger
-
-EOF
-
-chmod +x /etc/rc.d/rc3.d/S01debug
-
-###############################
-
diff --git a/custom/scripts/cleanup.post b/custom/scripts/cleanup.post
deleted file mode 100644 (file)
index d7c0ecd..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# save a little bit of space at least...
-rm -f /boot/initrd*
diff --git a/custom/scripts/console-switching.post b/custom/scripts/console-switching.post
new file mode 100644 (file)
index 0000000..debf6a2
--- /dev/null
@@ -0,0 +1,6 @@
+# console-switching.post
+# inittab hack to fix console - UI switching
+sed -ri '/^1\:2345\:respawn/d' /etc/inittab
+echo '' >> /etc/inittab
+echo '1:12345:respawn:/sbin/mingetty tty3' >> /etc/inittab
+echo '2:12345:respawn:/sbin/mingetty tty4' >> /etc/inittab
diff --git a/custom/scripts/copy-initd.post b/custom/scripts/copy-initd.post
new file mode 100644 (file)
index 0000000..092ce66
--- /dev/null
@@ -0,0 +1,6 @@
+# copy-initd.post
+if [ -d /etc/init.d ]; then
+    cp /etc/init.d/* /etc/rc.d/init.d/ -rdf
+fi
+rm -rf /etc/init.d*
+ln -sf /etc/rc.d/init.d /etc/init.d
diff --git a/custom/scripts/ims-service.post b/custom/scripts/ims-service.post
new file mode 100644 (file)
index 0000000..bea5313
--- /dev/null
@@ -0,0 +1,10 @@
+# ims-service.post
+# ims-service domain setting
+RESULT=`grep "192.168.0.163 config.45001.rcse" /etc/hosts`
+if [ -z "$RESULT" ]; then
+    echo "Set domain for auto configuration"
+    echo "192.168.0.163 config.45001.rcse" >> /etc/hosts
+else
+    echo "Already setted domain for test auto configuration"
+fi
+
diff --git a/custom/scripts/inittab.post b/custom/scripts/inittab.post
deleted file mode 100644 (file)
index ff23167..0000000
+++ /dev/null
@@ -1 +0,0 @@
-sed -i s/ENGINE=gl/ENGINE=fb/ /etc/profile.d/menu-screen.sh
similarity index 92%
rename from custom/scripts/cursor-config.post
rename to custom/scripts/invisi-cursor.post
index e17c58a..5b814dd 100644 (file)
@@ -1,5 +1,5 @@
+# invisi-cursor.post
 # Config workaround for TIVI-515: Invisible cursor.
-
 cd /opt/home/app/.e/e/config/samsung/
 eet -d e.cfg config > a.config
 sed -ie s/'value "cursor_size" int: 1'/'value "cursor_size" int: 24'/ a.config
diff --git a/custom/scripts/ivi-2.0-symlinks.post b/custom/scripts/ivi-2.0-symlinks.post
deleted file mode 100644 (file)
index f1c5029..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-
-# customize the slp-common post script  
-echo 'kickstart post script start'
-
-# to make udev happy
-ln -sf /bin/busybox /sbin/blkid
-
-
-# inittab hack to fix console - UI switching
-sed -ri '/^1\:2345\:respawn/d' /etc/inittab
-echo '' >> /etc/inittab 
-echo '1:12345:respawn:/sbin/mingetty tty3' >> /etc/inittab  
-echo '2:12345:respawn:/sbin/mingetty tty4' >> /etc/inittab 
-
-# modprobe fuse for sqlfs-mount
-/bin/sed -i "3i /sbin/modprobe fuse || :" /etc/rc.d/init.d/sqlfs-mount 
-
-
-if [ -d /etc/init.d ]; then
-    cp /etc/init.d/* /etc/rc.d/init.d/ -rdf
-fi
-rm -rf /etc/init.d*
-ln -sf /etc/rc.d/init.d /etc/init.d
-
-rm -rf /etc/localtime  
-ln -sf /opt/etc/localtime /etc/localtime  
-
-# Without this line the rpm doesn't get the architecture right.
-# echo -n 'armv7l-tizen-linux' > /etc/rpm/platform
-> /etc/rpm/platform
-
-ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
-ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
-ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
-
-pkg_initdb
-
-INITDB=1 ail_initdb
-/opt/apps/com.samsung.menu-screen/bin/menuscreen_initdb
-
-# ims-service domain setting
-RESULT=`grep "192.168.0.163 config.45001.rcse" /etc/hosts`  
-if [ -z "$RESULT" ]; then  
-    echo "Set domain for auto configuration"  
-    echo "192.168.0.163 config.45001.rcse" >> /etc/hosts  
-else  
-    echo "Already setted domain for test auto configuration"  
-fi  
-
-
-cat > /usr/bin/press << EOF
-!/bin/sh
-
-JUNK="SLP"
-
-[ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1"
-
-echo "Press return key to stop scripts"
-read -t \$TIMEOUT JUNK
-exit \$?
-EOF
-chmod +x /usr/bin/press
-
-ln -s /opt/etc/X11/xkb /usr/share/X11
-
-echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev
-
-rm -rf /usr/share/man
-rm -rf /usr/share/doc
-
-ldconfig
-
-mkdir -p /opt/var/lib/dbus
-
-rm -f /var/lib/rpm/__db*
-mv -f /var/lib/rpm /opt/var/lib/ 
-ln -sf /opt/var/lib/rpm /var/lib/rpm
-rpmdb --rebuilddb
-
-if [ -e /usr/bin/build-backup-data.sh ]; then
-           /usr/bin/build-backup-data.sh
-fi
-
-
-sed -i s/ENGINE=gl/ENGINE=fb/ /etc/profile.d/menu-screen.sh
-
-# enable USB networking with IP address 192.168.1.1 by default
-cat >/etc/rc.d/rc3.d/S01usbnet.sh <<END
-#!/bin/sh
-echo 0 > /sys/class/android_usb/android0/enable
-echo adb,rndis > /sys/class/android_usb/android0/functions
-echo 1 > /sys/class/android_usb/android0/enable
-ifconfig rndis0 192.168.100.1
-END
-chmod 755 /etc/rc.d/rc3.d/S01usbnet.sh
-
-ln -sf /etc/rc.d/init.d/ssh /etc/rc.d/rc3.d/S90ssh
-
-mkdir /opt/home/root
-ln -sf /opt/home/root /root
-
-# this file should be deleted after elegant fix merged
-############################### hacks to get
-# usbnet, udev, ssh, and other stuff
-cat > /etc/rc.d/rc3.d/S01debug << EOF
-
-# udev
-/sbin/udevd --daemon
-/sbin/udevadm trigger
-
-EOF
-
-chmod +x /etc/rc.d/rc3.d/S01debug
-
-###############################
-
-
diff --git a/custom/scripts/ivi-root.post b/custom/scripts/ivi-root.post
deleted file mode 100644 (file)
index e1c96a6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-if [[ (-h /root) ]]; then
-       rm /root
-       mkdir /root
-fi
diff --git a/custom/scripts/keygen.post b/custom/scripts/keygen.post
new file mode 100644 (file)
index 0000000..7dea1c0
--- /dev/null
@@ -0,0 +1,4 @@
+# keygen.post
+ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
+ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
+ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
diff --git a/custom/scripts/links-n-tweaks.post b/custom/scripts/links-n-tweaks.post
new file mode 100644 (file)
index 0000000..7212dd8
--- /dev/null
@@ -0,0 +1,37 @@
+# links-n-tweaks.post
+echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev
+
+# to make udev happy
+ln -sf /bin/busybox /sbin/blkid
+
+# modprobe fuse for sqlfs-mount
+/bin/sed -i "3i /sbin/modprobe fuse || :" /etc/rc.d/init.d/sqlfs-mount 
+
+# kill some docs and man pages
+rm -rf /usr/share/man
+rm -rf /usr/share/doc
+
+ldconfig
+
+mkdir -p /opt/var/lib/dbus
+if [ -e /usr/bin/build-backup-data.sh ]; then
+       /usr/bin/build-backup-data.sh
+fi
+
+# set some opt/ links
+rm -rf /etc/localtime  
+ln -sf /opt/etc/localtime /etc/localtime
+  
+ln -s /opt/etc/X11/xkb /usr/share/X11
+
+ln -sf /etc/info.ini /opt/etc/info.ini
+ln -sf /etc/info.ini /usr/etc/info.ini
+
+rm -fr /root
+ln -s /opt/home/app/ /root
+
+mkdir -p /opt/home/app
+chown app: /opt/home/app
+mkdir -p /home
+ln -s /opt/home/app /home/app
+
diff --git a/custom/scripts/menu-screen.post b/custom/scripts/menu-screen.post
new file mode 100644 (file)
index 0000000..4a0c635
--- /dev/null
@@ -0,0 +1,7 @@
+# menu-screen.post
+pkg_initdb
+
+INITDB=1 ail_initdb
+/opt/apps/com.samsung.menu-screen/bin/menuscreen_initdb
+
+sed -i s/ENGINE=gl/ENGINE=fb/ /etc/profile.d/menu-screen.sh
diff --git a/custom/scripts/misc-hacks.post b/custom/scripts/misc-hacks.post
new file mode 100644 (file)
index 0000000..9becb95
--- /dev/null
@@ -0,0 +1,12 @@
+# misc-hacks.post
+# hacks to get usbnet, udev, ssh, and other stuff
+cat > /etc/rc.d/rc3.d/S01debug << EOF
+
+# udev
+/sbin/udevd --daemon
+/sbin/udevadm trigger
+
+EOF
+
+chmod +x /etc/rc.d/rc3.d/S01debug
+
diff --git a/custom/scripts/platform-fix.post b/custom/scripts/platform-fix.post
new file mode 100644 (file)
index 0000000..bde76f1
--- /dev/null
@@ -0,0 +1,3 @@
+# Without this line the rpm doesn't get the architecture right.
+# echo -n 'armv7l-tizen-linux' > /etc/rpm/platform
+> /etc/rpm/platform
index 62707bd..b67d1f3 100644 (file)
@@ -1,2 +1,5 @@
+# rpm.post
 rm -f /var/lib/rpm/__db*
-rpm --rebuilddb
+mv -f /var/lib/rpm /opt/var/lib/ 
+ln -sf /opt/var/lib/rpm /var/lib/rpm
+rpmdb --rebuilddb
diff --git a/custom/scripts/symlink-root.post b/custom/scripts/symlink-root.post
deleted file mode 100644 (file)
index 60fe300..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-mkdir /opt/home/root
-ln -sf /opt/home/root /root
diff --git a/custom/scripts/systemd.post b/custom/scripts/systemd.post
deleted file mode 100644 (file)
index febbef8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-cp -a /lib/systemd/system/* /usr/lib/systemd/system
index 31368da..3099099 100644 (file)
@@ -1,4 +1,6 @@
+# usb-networking.post
 # enable USB networking with IP address 192.168.1.1 by default
+
 cat >/etc/rc.d/rc3.d/S01usbnet.sh <<END
 #!/bin/sh
 echo 0 > /sys/class/android_usb/android0/enable
@@ -9,3 +11,4 @@ END
 chmod 755 /etc/rc.d/rc3.d/S01usbnet.sh
 
 ln -sf /etc/rc.d/init.d/ssh /etc/rc.d/rc3.d/S90ssh
+
diff --git a/custom/scripts/user-bin-press.post b/custom/scripts/user-bin-press.post
new file mode 100644 (file)
index 0000000..fc44124
--- /dev/null
@@ -0,0 +1,14 @@
+# user-bin-press.post
+cat > /usr/bin/press << EOF
+!/bin/sh
+
+JUNK="SLP"
+
+[ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1"
+
+echo "Press return key to stop scripts"
+read -t \$TIMEOUT JUNK
+exit \$?
+EOF
+
+chmod +x /usr/bin/press
diff --git a/custom/scripts/users.post b/custom/scripts/users.post
deleted file mode 100644 (file)
index f64183c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-mkdir -p /opt/home/app
-chown app: /opt/home/app
-mkdir -p /home
-ln -s /opt/home/app /home/app
-ln -sf /opt/home/root /root
index a0b4f78..f1ebd63 100755 (executable)
@@ -37,8 +37,14 @@ PrePackages:
     - vconf
     - tizen-coreutils
 PostScripts:
-    - ivi-2.0-symlinks
-    - symlink-root
-    - boot-into-ui
+    - console-switching
+    - copy-initd
+    - platform-fix
+    - menu-screen
+    - ims-service
+    - user-bin-press
+    - rpm
     - usb-networking
-    - cursor-config
+    - misc-hacks
+    - links-n-tweaks
+    - invisi-cursor