diff options
author | Dongxing Liu <dongxingx.liu@intel.com> | 2013-07-16 17:00:13 +0800 |
---|---|---|
committer | Kitae Kim <kt920.kim@samsung.com> | 2013-07-17 11:26:47 +0900 |
commit | 3912dd96b0a8e1036400a93eeff6404a5405b1e0 (patch) | |
tree | 92b3e001bb884841ff1237c6b3c1bc04db7a118c | |
parent | 5cada99c4a3abcdf7723e41ede27f341c363d458 (diff) | |
download | qemu-3912dd96b0a8e1036400a93eeff6404a5405b1e0.tar.gz qemu-3912dd96b0a8e1036400a93eeff6404a5405b1e0.tar.bz2 qemu-3912dd96b0a8e1036400a93eeff6404a5405b1e0.zip |
package: modify install and remove scripts to support multiple host OS
Change-Id: Icecf00a68be36b69c7e43c72759b8163aa16d9dc
Signed-off-by: Dongxing Liu <dongxingx.liu@intel.com>
-rwxr-xr-x | package/emulator-qemu-x86.install.ubuntu-32 | 8 | ||||
-rwxr-xr-x | package/emulator-qemu-x86.install.ubuntu-64 | 8 | ||||
-rwxr-xr-x | package/emulator-qemu-x86.remove.ubuntu-32 | 8 | ||||
-rwxr-xr-x | package/emulator-qemu-x86.remove.ubuntu-64 | 8 |
4 files changed, 28 insertions, 4 deletions
diff --git a/package/emulator-qemu-x86.install.ubuntu-32 b/package/emulator-qemu-x86.install.ubuntu-32 index 6cc3315710..d84e1dc4c4 100755 --- a/package/emulator-qemu-x86.install.ubuntu-32 +++ b/package/emulator-qemu-x86.install.ubuntu-32 @@ -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 diff --git a/package/emulator-qemu-x86.install.ubuntu-64 b/package/emulator-qemu-x86.install.ubuntu-64 index 6cc3315710..d84e1dc4c4 100755 --- a/package/emulator-qemu-x86.install.ubuntu-64 +++ b/package/emulator-qemu-x86.install.ubuntu-64 @@ -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 diff --git a/package/emulator-qemu-x86.remove.ubuntu-32 b/package/emulator-qemu-x86.remove.ubuntu-32 index 9a5c62498f..05e72fefb1 100755 --- a/package/emulator-qemu-x86.remove.ubuntu-32 +++ b/package/emulator-qemu-x86.remove.ubuntu-32 @@ -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 diff --git a/package/emulator-qemu-x86.remove.ubuntu-64 b/package/emulator-qemu-x86.remove.ubuntu-64 index 9a5c62498f..05e72fefb1 100755 --- a/package/emulator-qemu-x86.remove.ubuntu-64 +++ b/package/emulator-qemu-x86.remove.ubuntu-64 @@ -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 |