package: modify install and remove scripts to support multiple host OS
authorDongxing Liu <dongxingx.liu@intel.com>
Tue, 16 Jul 2013 09:00:13 +0000 (17:00 +0800)
committerKitae Kim <kt920.kim@samsung.com>
Wed, 17 Jul 2013 02:26:47 +0000 (11:26 +0900)
Change-Id: Icecf00a68be36b69c7e43c72759b8163aa16d9dc
Signed-off-by: Dongxing Liu <dongxingx.liu@intel.com>
package/emulator-qemu-x86.install.ubuntu-32
package/emulator-qemu-x86.install.ubuntu-64
package/emulator-qemu-x86.remove.ubuntu-32
package/emulator-qemu-x86.remove.ubuntu-64

index 6cc33157108d582314a859565a7a33ecd5b87093..d84e1dc4c4c0f83a1429010352e926d2a64d686e 100755 (executable)
@@ -7,11 +7,17 @@ then
    exit 2;
 fi
 
+if [ -e /etc/os-release ]; then
+       OS_NAME=`cat /etc/os-release | grep ID | head -n 1 | awk -F= '{print $2}'`
+fi
+
 TMP_FILE=init_tizen-kvm.sh
 echo "cp ${TIZEN_SDK_INSTALL_PATH}/tools/emulator/etc/tizen-kvm /etc/init.d/" >> $TMP_FILE
 echo "cp ${TIZEN_SDK_INSTALL_PATH}/tools/emulator/etc/45-tizen-kvm.rules /lib/udev/rules.d/" >> $TMP_FILE
 echo "/etc/init.d/tizen-kvm start" >> $TMP_FILE
-echo "update-rc.d tizen-kvm defaults" >> $TMP_FILE
+if [ "ubuntu" = "${OS_NAME}" ] ; then
+       echo "update-rc.d tizen-kvm defaults" >> $TMP_FILE
+fi
 
 chmod +x $TMP_FILE
 
index 6cc33157108d582314a859565a7a33ecd5b87093..d84e1dc4c4c0f83a1429010352e926d2a64d686e 100755 (executable)
@@ -7,11 +7,17 @@ then
    exit 2;
 fi
 
+if [ -e /etc/os-release ]; then
+       OS_NAME=`cat /etc/os-release | grep ID | head -n 1 | awk -F= '{print $2}'`
+fi
+
 TMP_FILE=init_tizen-kvm.sh
 echo "cp ${TIZEN_SDK_INSTALL_PATH}/tools/emulator/etc/tizen-kvm /etc/init.d/" >> $TMP_FILE
 echo "cp ${TIZEN_SDK_INSTALL_PATH}/tools/emulator/etc/45-tizen-kvm.rules /lib/udev/rules.d/" >> $TMP_FILE
 echo "/etc/init.d/tizen-kvm start" >> $TMP_FILE
-echo "update-rc.d tizen-kvm defaults" >> $TMP_FILE
+if [ "ubuntu" = "${OS_NAME}" ] ; then
+       echo "update-rc.d tizen-kvm defaults" >> $TMP_FILE
+fi
 
 chmod +x $TMP_FILE
 
index 9a5c62498f1bc623124c27b3b80a73d54b0ec94c..05e72fefb196a0f16c29122c87cf556261a4b81e 100755 (executable)
@@ -7,8 +7,14 @@ then
    exit 2;
 fi
 
+if [ -e /etc/os-release ]; then
+       OS_NAME=`cat /etc/os-release | grep ID | head -n 1 | awk -F= '{print $2}'`
+fi
+
 TMP_FILE=remove_tizen-kvm.sh
-echo "update-rc.d -f tizen-kvm remove" >> $TMP_FILE
+if [ "ubuntu" = "${OS_NAME}" ] ; then
+       echo "update-rc.d -f tizen-kvm remove" >> $TMP_FILE
+fi
 echo "rm -f /etc/init.d/tizen-kvm" >> $TMP_FILE
 echo "rm -f /lib/udev/rules.d/45-tizen-kvm.rules" >> $TMP_FILE
 
index 9a5c62498f1bc623124c27b3b80a73d54b0ec94c..05e72fefb196a0f16c29122c87cf556261a4b81e 100755 (executable)
@@ -7,8 +7,14 @@ then
    exit 2;
 fi
 
+if [ -e /etc/os-release ]; then
+       OS_NAME=`cat /etc/os-release | grep ID | head -n 1 | awk -F= '{print $2}'`
+fi
+
 TMP_FILE=remove_tizen-kvm.sh
-echo "update-rc.d -f tizen-kvm remove" >> $TMP_FILE
+if [ "ubuntu" = "${OS_NAME}" ] ; then
+       echo "update-rc.d -f tizen-kvm remove" >> $TMP_FILE
+fi
 echo "rm -f /etc/init.d/tizen-kvm" >> $TMP_FILE
 echo "rm -f /lib/udev/rules.d/45-tizen-kvm.rules" >> $TMP_FILE