6452f6aecf
- Add deepin-daemon-dbus-installer and deepin-daemon-polkit-installer - Update version to 5.13.6 * Fix bugs * Update translations - Add xvfb-run.patch, run `dde-pixmix` under xvfb-run - File polkit and dbus service profiles, workaround rpmlintrc errors - Update version to 5.12.52 * Fix bugs * feat: Initial packit setup * Update translations * feat(accounts): trim quotation of LOCALE` OBS-URL: https://build.opensuse.org/request/show/884411 OBS-URL: https://build.opensuse.org/package/show/X11:Deepin/deepin-daemon?expand=0&rev=8
63 lines
1.8 KiB
Bash
63 lines
1.8 KiB
Bash
#!/bin/bash
|
|
# Name: Deepin polkit profiles installer
|
|
# Version: 1.0
|
|
# Description: On openSUSE, deepin-daemon does not install polkit profiles by default
|
|
# for security. The tool can help users to install these profiles for getting the
|
|
# full features of Deepin Desktop, if user does not care security.
|
|
# Author: Hillwood Yang <hillwood@opensuse.org>
|
|
# License: WTFPL-2.0
|
|
|
|
if [ "$(id -u)" != "0" ]; then
|
|
echo "error: You must be root to use this program!"
|
|
exit 1
|
|
fi
|
|
|
|
while :
|
|
do
|
|
ANSWER=n
|
|
echo "This is the Deepin daemon polkit installer, it helps you to install the polkit \
|
|
profiles for Deepin daemon. These profiles will enable the full features for Deepin Desktop."
|
|
echo "These polkit profiles are not appraised by SUSE security Team. Maybe install these \
|
|
profiles bring some unknown security issues. Are you sure that you install \
|
|
this files anyhow?[Yes/No]N"
|
|
read ANSWER
|
|
case $ANSWER in
|
|
Y | y | yes | Yes)
|
|
break;;
|
|
N | n | no | No)
|
|
break;;
|
|
*)
|
|
echo "Unknown response, please reinput";;
|
|
esac
|
|
done
|
|
|
|
if [ "$ANSWER" = "n" ] || [ "$ANSWER" = "N" ] || [ "$ANSWER" = "no" ] || [ "$ANSWER" = "No" ]; then
|
|
echo "Exit deepin-daemon-dbus installation."
|
|
exit 1
|
|
fi
|
|
|
|
SYSTEM_TMP=/tmp
|
|
TMP_DIR=$SYSTEM_TMP/deepin-daemon-polkit
|
|
|
|
pushd /usr/share/polkit-1/actions/ &>/dev/null
|
|
|
|
Filelist=&(ls com.deepin.daemon*) &>/dev/null
|
|
|
|
if [ "$Filelist" != "" ]; then
|
|
rm -rf "$Filelist"
|
|
fi
|
|
|
|
popd &>/dev/null
|
|
|
|
mkdir -p $TMP_DIR
|
|
|
|
pushd $TMP_DIR &>/dev/null
|
|
tar -xvf /usr/share/dde-daemon/polkit.tar.gz &>/dev/null
|
|
cp polkit/* /usr/share/polkit-1/actions/
|
|
chmod 0644 /usr/share/polkit-1/actions/com.deepin.daemon*
|
|
popd &>/dev/null
|
|
|
|
rm -rf $TMP_DIR
|
|
|
|
echo "Deepin polkit profiles install succeed!"
|