diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2018-11-09 11:39:46 -0600 |
---|---|---|
committer | Adriana Kobylak <anoo@us.ibm.com> | 2018-11-26 11:29:58 -0600 |
commit | 3a19e62a59f317e5fae70054f6d8dafe985d8105 (patch) | |
tree | d2456897d486f69412ca3ccb0643b7f51f403c7e /image_manager.cpp | |
parent | 43699ca702068934add136309f28fa427c0d88e6 (diff) | |
download | phosphor-bmc-code-mgmt-3a19e62a59f317e5fae70054f6d8dafe985d8105.tar.gz phosphor-bmc-code-mgmt-3a19e62a59f317e5fae70054f6d8dafe985d8105.zip |
sync_watch: Handle IN_IGNORED
When the hostname is updated via systemd, it modifies the /etc/hostname
file in a way that triggers a IN_CLOSE_NOWRITE and IN_IGNORED signal.
* When IN_IGNORED is received, re-subscribe the file, since it means
that the inotify watch was removed.
* A subsequent IN_CLOSE_WRITE signal is received after the re-subscribe
which takes care of syncing the hostname file.
Tested: The hostname was synced when changed multiple times in a row
using the REST API.
Change-Id: I30abfcdc8b33f77adc6349d345cc957b07898018
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'image_manager.cpp')
0 files changed, 0 insertions, 0 deletions