diff options
author | Jinhyung Jo <jinhyung.jo@samsung.com> | 2017-03-03 17:07:15 +0900 |
---|---|---|
committer | Jinhyung Jo <jinhyung.jo@samsung.com> | 2017-03-06 18:34:00 +0900 |
commit | 3a615b7b256961a0db4b74e00733e43ee6c21df4 (patch) | |
tree | 8a27e2f8e9c272ea51bf01d65e539422ece29fc1 /package/emulator-qemu-x86.remove.linux | |
parent | 9ab518ce4462c5d1db5e91697262822926ca3927 (diff) | |
download | qemu-3a615b7b256961a0db4b74e00733e43ee6c21df4.tar.gz qemu-3a615b7b256961a0db4b74e00733e43ee6c21df4.tar.bz2 qemu-3a615b7b256961a0db4b74e00733e43ee6c21df4.zip |
package: unify packaging regardless of version
Change-Id: Ia2c969c6d5da5fcf4b1b90f125a8d4c5530a128d
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
Diffstat (limited to 'package/emulator-qemu-x86.remove.linux')
-rwxr-xr-x | package/emulator-qemu-x86.remove.linux | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/package/emulator-qemu-x86.remove.linux b/package/emulator-qemu-x86.remove.linux new file mode 100755 index 0000000000..1b3afc2f16 --- /dev/null +++ b/package/emulator-qemu-x86.remove.linux @@ -0,0 +1,48 @@ +#!/bin/bash -ex + +TIZEN_SDK_INSTALL_PATH=`echo ${INSTALLED_PATH}` +if [ -z "${TIZEN_SDK_INSTALL_PATH}" ] +then +# echo "There is no TIZEN_SDK_PATH ENV" >> /tmp/emulator.log + exit 2; +fi + +LSB_RELEASE=`which lsb_release` +if [ "${LSB_RELEASE}" = "" ]; then + if [ -e /etc/os-release ]; then + OS_NAME=`cat /etc/os-release | grep ID | head -n 1 | awk -F= '{print $2}'` + fi + # TODO: Detect other linux distributions. +else + OS_NAME=`lsb_release --id --short` +fi + +if [ ! -z "${OS_NAME}" ]; then + OS_NAME=`echo ${OS_NAME} | tr '[:upper:]' '[:lower:]'` +fi +echo "Linux Distribution: ${OS_NAME}" + +TMP_FILE=remove_tizen-init.sh +echo "#!/bin/bash -ex" >> ${TMP_FILE} +echo "rm -f /etc/init.d/tizen-vhost-net" >> ${TMP_FILE} +echo "rm -f /lib/udev/rules.d/45-tizen-vhost-net.rules" >> ${TMP_FILE} + +chmod +x ${TMP_FILE} + +if [ "${TSUDO}" != "" ] # since installer v2.27 +then + TSUDO_MSG="Enter your password to remove /etc/init.d/tizen-vhost-net." + TMP_PATH="`pwd`/${TMP_FILE}" + $TSUDO -m "${TSUDO_MSG}" bash "${TMP_PATH}" +else + GKSUDO=`which gksudo` + if [ "${GKSUDO}" = "" ] + then + echo "there is no gksudo." + sudo ./${TMP_FILE} + else + gksudo ./${TMP_FILE} + fi +fi + +rm ${TMP_FILE} |