Run provisioning after package install
This commit is contained in:
@@ -18,12 +18,14 @@ log() {
|
|||||||
|
|
||||||
log "starting"
|
log "starting"
|
||||||
|
|
||||||
|
chrome_ok=true
|
||||||
|
|
||||||
if /usr/local/bin/classroom-chrome-setup; then
|
if /usr/local/bin/classroom-chrome-setup; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
log "WARNING: Google Chrome is not installed. The Browser button will"
|
chrome_ok=false
|
||||||
log "WARNING: not work until this succeeds. Retrying at the next boot,"
|
log "WARNING: Google Chrome is not installed yet."
|
||||||
log "WARNING: or run: sudo classroom-chrome-setup"
|
log "WARNING: Provisioning will retry automatically."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# DVD codecs are only fetched for rooms that actually have a drive.
|
# DVD codecs are only fetched for rooms that actually have a drive.
|
||||||
@@ -38,4 +40,10 @@ fi
|
|||||||
log "finished"
|
log "finished"
|
||||||
|
|
||||||
# Provisioning is best-effort by design.
|
# Provisioning is best-effort by design.
|
||||||
|
# Chrome is required for a usable classroom. Returning failure here does
|
||||||
|
# not block boot; systemd retries this oneshot service in the background.
|
||||||
|
if [[ "$chrome_ok" != true ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
@@ -6,6 +6,8 @@ Wants=network-online.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=30
|
||||||
ExecStart=/usr/local/bin/classroom-provision
|
ExecStart=/usr/local/bin/classroom-provision
|
||||||
# Building libdvdcss from source takes a while on classroom hardware.
|
# Building libdvdcss from source takes a while on classroom hardware.
|
||||||
TimeoutStartSec=1800
|
TimeoutStartSec=1800
|
||||||
|
|||||||
Reference in New Issue
Block a user