Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 4 commits
  • 3 files changed
  • 0 commit comments
  • 2 contributors
Commits on Jul 21, 2013
hasufell add some verbose nonfatal error messages
Hitting those cases will not break the browser profile
(however he will probably lose all changes since last sync),
but indicate a problem with the user setup or service
shutdown process. This can happen e.g. when $VOLATILE gets unmounted
before the psd unsync in the shutdown process.
0dd0739
@graysky2 more debug info in preview mode e0379cd
@graysky2 Merge pull request #48 from gentoo/master
add some verbose nonfatal error messages
0ac27c1
@graysky2 more nonfatal error messages e2f2e02
Showing with 31 additions and 10 deletions.
  1. +8 −2 CHANGELOG
  2. +1 −1  Makefile
  3. +22 −7 common/profile-sync-daemon.in
View
10 CHANGELOG
@@ -1,7 +1,13 @@
+v5.38
+21-Jul-2013
+Include status of psd.service and psd-resync.service in preview mode.
+Include status of pseudo pid file and resync cronjob for all others.
+Add some verbose nonfatal error messages (hasufell).
+
v5.37
20-Jul-2013
-OpenRC: simplify service and fix bug on shutdown[1] (hasufell).
-1. Upstream bug report: https://bugs.gentoo.org/show_bug.cgi?id=398431
+OpenRC: simplify service and fix bug on shutdown (hasufell).
+Upstream bug report: https://bugs.gentoo.org/show_bug.cgi?id=398431
v5.36.4
20-Jul-2013
View
2  Makefile
@@ -1,4 +1,4 @@
-VERSION = 5.37
+VERSION = 5.38
PN = profile-sync-daemon
PREFIX ?= /usr
View
29 common/profile-sync-daemon.in
@@ -345,18 +345,29 @@ kill_browsers() {
parse_conf_file() {
if [[ -z $(sed 's| \\.*$||' /etc/issue | head -n 1) ]]; then
- echo -e "${RED}Profile-sync-daemon v$VERS"${NRM}
+ echo -e "${BLD}Profile-sync-daemon v$VERS"${NRM}
else
- echo -e "${RED}Profile-sync-daemon v$VERS${NRM}${BLD} on $(sed 's| \\.*$||' /etc/issue | head -n 1)."${NRM}
+ echo -e "${BLD}Profile-sync-daemon v$VERS${NRM}${BLD} on $(sed 's| \\.*$||' /etc/issue | head -n 1)."${NRM}
fi
echo
- echo -e "${BLD}Daemon file ${BLU}$DAEMON_FILE${NRM}${BLD} is $([[ -f $DAEMON_FILE ]] && echo present || echo not present)."${NRM}
-
if [[ -f /usr/lib/systemd/system/psd.service ]]; then
- # running sysmted
- echo -e "${BLD}Service is currently $(systemctl is-active psd)."${NRM}
- fi
+ # running systemd
+ psd_state=$(systemctl is-active psd)
+ resync_state=$(systemctl is-active psd-resync.timer)
+ [[ "$psd_state" = "active" ]] && psd_color="${GRN}" || psd_color="${RED}"
+ [[ "$resync_state" = "active" ]] && resync_color="${GRN}" || resync_color="${RED}"
+
+ echo -e " ${BLD}Systemd service is currently ${psd_color}$psd_state${NRM}${BLD}."${NRM}
+ echo -e " ${BLD}Systemd resync service is currently ${resync_color}$resync_state${NRM}${BLD}."${NRM}
+ else
+ # using other init system + cron job for resync
+ [[ -x /etc/cron.hourly/psd-update ]] && resync_state="present" || resync_state="not present"
+ [[ "$resync_state" = "present" ]] && resync_color=${GRN} || resync_color=${RED}
+ echo -e " ${BLD}Daemon pid file is $([[ -f $DAEMON_FILE ]] && \
+ echo -e ${GRN}present${NRM}${BLD} || echo -e ${RED}not present${NRM}${BLD})."${NRM}
+ echo -e " ${BLD}Resync cronjob is ${resync_color}${resync_state}${NRM}${BLD}."${NRM}
+ fi
echo
echo -e "${BLD}Psd will manage the following per ${BLU}${PSDCONF}${NRM}${BLD} settings:"${NRM}
echo
@@ -461,6 +472,8 @@ do_sync() {
chown -h $user:$group "$DIR"
touch "$DIR/.flagged"
fi
+ else
+ echo -e "${RED}${DIR} does not exist or is a broken symlink! Is /home or ${VOLATILE} unmounted?${NRM}" >&2
fi
done
done
@@ -494,6 +507,8 @@ do_unsync() {
[[ -d "$BACKUP" ]] && mv "$BACKUP" "$DIR"
[[ -d "$VOLATILE/$user-$browser$suffix" ]] &&
rm -rf "$VOLATILE/$user-$browser$suffix"
+ else
+ echo -e "${RED}${DIR} does not exist or is not a symlink! Is /home unmounted?${NRM}" >&2
fi
done
done

No commit comments for this range

Something went wrong with that request. Please try again.