Blocking snu.lge.com in /etc/hosts never stopped the boot popup on a CX, and the reason only showed up on the TV itself: /usr/sbin/update is a systemd unit (webos-mbd.target) that runs its version check against https://snu.lge.com/CheckSWAutoUpdate.laf 15-20 seconds before the Homebrew Channel gets as far as running its init.d hooks. The check therefore succeeds on every boot and the alert is already on screen before any hosts entry exists. Homebrew Channel's own "block system updates" toggle loses the same race. Nothing running that late can win it: every systemd unit path is a read-only overlay except tmpfs /run, and no persistent setting gates the check - automaticUpdate, support/softwareUpdateEnable, hotelMode/swUpdateEnable and .UpdateIsInprogress were each measured by restarting the daemon and counting its requests. So dismiss the popup instead. The boot hook recovers the alert id from the updater's own log (_gAlertWindowId), which is the only way to reach an alert that opened before we could subscribe - com.webos.notification never reports it to a late subscriber and closeAllAlerts rejects every source id it accepts. A companion alert-watch.sh then stays subscribed for the rest of the session. Also drop two things that were never true. There is no staged firmware image driving the popup (the staging dir is empty at boot; the size the daemon reports is in-memory only), and there is no update service to stop - /etc/init is dead upstart leftovers on a systemd TV, so the old stopServices layer printed "stopped update" while doing nothing. - rename the hook to 00-lgupdateblocker so run-parts runs it first, removing the legacy file on apply - add support/ and hotelMode/ to the scanned settings categories - stop matching "ota" inside screenRotation, which would have switched screen rotation off - kill the watcher by process group, and make its TERM trap exit - a trap that only returns resumes the script, which then re-subscribes Verified on an LG OLED55CX8LB (webOS 5, 04.60.65): after a reboot the boot log records "dismissed update popup com.webos.service.update-1788650782451", matching the id the updater logged that boot. Raised 01:26:22, closed 01:26:37 - so it is visible for ~15s and then goes away on its own. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
ae8229588e
commit
ef8b6b96c4
+10
-8
@@ -18,6 +18,11 @@
|
||||
title: 'Block LG update servers',
|
||||
desc: 'Points snu/su/nsu.lge.com at 127.0.0.1 in /etc/hosts, re-applied on every boot'
|
||||
},
|
||||
{
|
||||
key: 'dismissPopup',
|
||||
title: 'Close the update popup',
|
||||
desc: 'The TV asks LG about updates ~20s before homebrew starts, so the popup is closed instead'
|
||||
},
|
||||
{
|
||||
key: 'purgeCache',
|
||||
title: 'Delete staged firmware',
|
||||
@@ -32,11 +37,6 @@
|
||||
key: 'disableSettings',
|
||||
title: 'Turn off auto-update settings',
|
||||
desc: 'Switches off every update-related key com.webos.settingsservice exposes'
|
||||
},
|
||||
{
|
||||
key: 'stopServices',
|
||||
title: 'Stop update services at boot',
|
||||
desc: 'Advanced: stops the update upstart jobs found on this TV after every boot'
|
||||
}
|
||||
];
|
||||
|
||||
@@ -50,10 +50,10 @@
|
||||
|
||||
var config = {
|
||||
blockHosts: true,
|
||||
dismissPopup: true,
|
||||
purgeCache: true,
|
||||
lockCache: false,
|
||||
disableSettings: true,
|
||||
stopServices: false
|
||||
disableSettings: true
|
||||
};
|
||||
|
||||
var focusables = [];
|
||||
@@ -229,7 +229,9 @@
|
||||
row('Staging folders', stagedDirs ? stagedDirs + ' found' : 'none on this TV');
|
||||
row('Staged firmware', stagedDirs ? bytes(staged) : '-');
|
||||
row('Staging locked', stagedDirs ? locked + ' / ' + stagedDirs : '-');
|
||||
row('Update jobs found', (status.jobs || []).length ? status.jobs.join(', ') : 'none');
|
||||
var popup = status.popup || {};
|
||||
row('Update popup this boot', popup.lastAlertId ? 'raised, then closed' : 'none raised');
|
||||
row('Popup watcher', popup.watcherPid ? 'running (pid ' + popup.watcherPid + ')' : 'not running');
|
||||
row('Boot hook', status.bootHook.installed ? 'installed' : 'not installed');
|
||||
|
||||
var settings = status.settings || [];
|
||||
|
||||
Reference in New Issue
Block a user