Skip to content

Commit

Permalink
support factory-fit immutable attr (#181)
Browse files Browse the repository at this point in the history
* support factory-fit immutable attr

* slight fixup
  • Loading branch information
vdromanov authored Oct 7, 2024
1 parent fb985e0 commit 75ff5c7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
15 changes: 3 additions & 12 deletions configs/usr/lib/cgi-bin/factory_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,9 @@ def main():
RW_DIR = "/mnt/data/.wb-update/"
os.makedirs(RW_DIR, exist_ok=True)

# create flags file
FLAGS_FILE = os.path.join(RW_DIR, 'install_update.web.flags')
with open(FLAGS_FILE, "w") as flags_file_h:
flags_file_h.write('--factoryreset --from-emmc-factoryreset ')

# make hardlink to factoryreset.fit
SRC_FIT = "/mnt/data/.wb-restore/factoryreset.fit"
DST_FIT = os.path.join(RW_DIR, "webupd.fit")
os.link(SRC_FIT, DST_FIT)

# open/close it for writing to trigger wb-watch-update
with open(DST_FIT, "ab") as fp:
# open/close it for writing to trigger wb-watch-update's special mode
USE_FACTORY_FIT_FLAG = os.path.join(RW_DIR, "wb_use_factory_fit.flag")
with open(USE_FACTORY_FIT_FLAG, "ab") as fp:
pass

sys.stdout.write("Status: 200\r\n\r\n")
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
wb-configs (3.31.0) stable; urgency=medium

* support factory-fit immutable attr

-- Vladimir Romanov <[email protected]> Thu, 03 Oct 2024 17:01:02 +0300

wb-configs (3.30.2) stable; urgency=medium

* Minor fix to check.sh error reporting
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Homepage: https://github.com/wirenboard/wb-configs

Package: wb-configs
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, ucf, wb-utils (>= 4.23.0~~), inotify-tools, mosquitto (>= 1.4.7-1), watchdog (>= 5.15),
Depends: ${shlibs:Depends}, ${misc:Depends}, ucf, wb-utils (>= 4.24.0~~), inotify-tools, mosquitto (>= 1.4.7-1), watchdog (>= 5.15),
linux-image-wb2 | linux-image-wb6 (>= 5.10.35-wb127~~) | linux-image-wb7 (>= 5.10.35-wb127~~) | linux-image-wb8,
fcgiwrap, wb-update-manager, sudo, pigz
Pre-Depends: wb-update-manager
Expand Down

0 comments on commit 75ff5c7

Please sign in to comment.