Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
new hotfix for starting cnchi with polkit
Browse files Browse the repository at this point in the history
  • Loading branch information
lots0logs committed Aug 1, 2016
1 parent 4b7b04d commit 14debf9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
21 changes: 16 additions & 5 deletions dist/antergos-iso
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,17 @@ font_patch() {


stop_cnchi() {
sudo killall -w /usr/bin/cnchi cnchi python && sudo rm /tmp/.setup-running > /dev/null 2>&1
sudo systemctl stop pamac > /dev/null 2>&1
sudo rm /var/lib/pacman/db.lck > /dev/null 2>&1
{ sudo killall -w /usr/bin/cnchi cnchi python
sudo rm /tmp/.setup-running
sudo systemctl stop pamac
sudo rm /var/lib/pacman/db.lck; } > /dev/null 2>&1

return 0
}


start_cnchi() {
stop_cnchi && sudo -E cnchi -d -v -s bugsnag &
stop_cnchi && /usr/bin/cnchi -s bugsnag &

return 0;
}
Expand Down Expand Up @@ -161,7 +162,15 @@ hotfix_maybe_update() {


_hotfix_ckbcomp_script_file_permissions() {
chmod +x /usr/share/cnchi/scripts/ckbcomp
local _file
_file='/usr/share/cnchi/scripts/ckbcomp'
[[ -x "${_file}" ]] || { _2log '_file is not executable! fixing...'; sudo chmod +x "${_file}"; }
}


_hotfix_cnchi_polkit_policy() {
sudo systemctl restart polkit
sudo sed -r -i 's|\/usr.+\.py|pkexec cnchi|g' '/usr/bin/cnchi'
}


Expand All @@ -185,6 +194,8 @@ hotfix_run_when_connected() {
notify_no_updates
fi

_hotfix_cnchi_polkit_policy

[[ -f /tmp/.setup-running ]] || start_cnchi
notify-send.sh -s "${LAST_SENT}"
}
Expand Down
2 changes: 1 addition & 1 deletion iso-hotfix-utility
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ _notify_user() {
[[ -f /tmp/.last_sent ]] && read -r LAST_SENT < /tmp/.last_sent

if [[ "${LAST_SENT}" != '' ]]; then
LAST_SENT=$(notify-send.sh -a "${APP_NAME}" -i "${APP_ICON}" -u "${LEVEL}" -p -r "${LAST_SENT}" "$1" "$2")
LAST_SENT=$(notify-send.sh -a "${APP_NAME}" -i "${APP_ICON}" -u "${LEVEL}" -r "${LAST_SENT}" -p "$1" "$2")
else
LAST_SENT=$(notify-send.sh -a "${APP_NAME}" -i "${APP_ICON}" -u "${LEVEL}" -p "$1" "$2")
fi
Expand Down

0 comments on commit 14debf9

Please sign in to comment.