1

We have some hg commands in the /etc/pm/sleep.d/00_update file:

#!/bin/bash

case "$1" in
  hibernate|suspend)
    hg -R /home/user/code add -X /home/user/code/**~
    hg -R /home/user/code commit --addremove -m "label" -u user
    hg -R /home/user/code push https://user:***@bitbucket.org/user/code
    ;;
  thaw|resume)
    hg -R /home/user/code pull https://user:***@bitbucket.org/user/code
    ;;
esac

They can't conclude pushing because the system loses the WIFI connection before this happens, just after the suspend signal. This has been verified by replacing them with a ping command; that cannot operate either.

It doesn't look like interference with other pm files, because this is the first to be executed. These are the others: 00_update, 10_grub-common, 10_unattended-upgrades-hibernate, novatel_3g_suspend, and the systemd folder contains is dbus-org.freedesktop.Avahi.service, sockets.target.wants, syslog.service, multi-user.target.wants, sysinit.target.wants. I'm wondering where is the WIFI sent off, and how can I prevent this until the hg commands have completed.

Note: restarting the WIFI before hg and off again doesn't look like a valid solution to me.

0

You must log in to answer this question.

Browse other questions tagged .