If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.

0
U

Property:pause (avmcmd)

From BoxMatrix


BoxMatrix >> Shell-Commands >> pause (avmcmd) @ BoxMatrix   -   IRC-Chat   -   Translate: de es fr it nl pl
News Selectors Models Accessories Components Environment Config Commands System Webif Software Develop Lexicon Community Project Media

Startup-Scr Hotplug-Scr BusyBox-Cmds Bash-Cmds AVM-Cmds Chipset-Cmds Linux-Cmds Shared-Libs Kernel-Mods Research

Info
  
Name-Collision - multiple objects in this wiki use the name pause!
pause (avmcmd) Helper for creating a very simple Semaphore.

AVM-Command

Goto:   Dependencies   -   Model-Matrix   -   Symbols   -   SMW-Browser

Details

pause is a helper for creating a very simple Semaphore, a locking mechanism to state that something is already taken.
This is often used in computer technology wherever ressources could only be used once at any time.

Compare it to the indicator of a public toilet which is either red / engaged (german besetzt) or green / vacant (german frei).
This indicator acts as a very simple Semaphore, making the next person in the queue wait for green as long as it's red.

pause does not provide any help function and expects 2 arguments:

pause <sema-file> [<timestamp>]

Pause creates the <sema-file> and writes its PID into it and waits a hardcoded 30 seconds timeout. After this timeout
it will delete the <sema-file> and terminate silently. <timestamp> is ignored and just appears on the ps process list.
This all seems confusing and doesn't make any sense on first viewing but let's see how it is used.

In fw 4.49 pause is used in the Hotplug-Scripts storage, printer and run_mount and in samba_control.
These all create a Semaphore (passeeren) like this:

pause /var/X.$$ `date +%s`

$$ is the PID of the Shell process calling pause, and date +%s evaluates to the Timestamp in the moment of calling.
Let's see what this does:

# echo $$
1424
# pause /var/X.$$ `date +%s` &
# ps | grep pause
1882 root       740 S    pause /var/X.1424 1668469174
1885 root      1044 S    grep pause
# cat /var/X.1424
1882

If the Shell 1424 wants to free the Semaphore (vrijgeven) before its timeout it just needs to kill -USR1 the PID written
in /var/X.1424. With the Timestamp from ps it could use an alternative timeout to do so.

Very simple solution but that's how the timing of Hotplug-Scripts was Semaphore protected in early FRITZ!OS times.

Dependencies

Daily updated index of all dependencies of this command. Last update: 2024-04-25 07:20 GMT.
A * in the Mod column marks info from Supportdata-Probes, which will always stay incomplete.

Relation Typ Object Mod Firmware Info Origin
Depends on lib libc.so 17 3.87 - 4.99 Standard C library Linux
Depends on lib libgcc_s.so 13 4.28 - 4.99 GCC low-level runtime library Linux
2 dependencies for this command

Model-Matrix

Daily updated index of the presence, path and size of this command for each model. Last update: 2024-04-25 05:07 GMT.
Showing all models using this command. Click any column header (click-wait-click) to sort the list by the respective data.
The (main/scrpn/boot/arm/prx/atom) label in the Model column shows which CPU is meant for models with multiple Linux instances.
Note that this list is merged from Firmware-Probes of all known AVM firmware for a model, including Recovery.exe and Labor-Files.

Model Firmware Path Size
FRITZ!Box 2070 3.87 - 4.15 /bin 5.6k
FRITZ!Box 2170 4.31 - 4.57 /bin 5.8k - 65.7k
FRITZ!Box WLAN 3050 3.91 - 4.07 /bin 5.6k
FRITZ!Box WLAN 3070 3.87 - 4.15 /bin 5.6k
FRITZ!Box WLAN 3130 4.21 - 4.34 /bin 5.6k - 5.8k
FRITZ!Box WLAN 3131 4.29 - 4.57 /bin 5.8k - 65.7k
FRITZ!Box WLAN 3170 4.31 - 4.58 /bin 5.8k - 65.7k
FRITZ!Box WLAN 3270 4.57 /bin 4.5k
FRITZ!Box Fon 5124 4.47 /bin 5.8k
FRITZ!Box Fon WLAN 7140 4.02 - 4.59 /bin 5.6k - 65.7k
FRITZ!Box Fon WLAN 7141 4.14 - 4.59 /bin 5.8k - 65.7k
FRITZ!Fon 7150 4.27 - 4.77 /bin 5.6k - 5.8k
FRITZ!Box Fon WLAN 7170 3.96 - 4.99 /bin 4.5k - 65.7k
FRITZ!Box Fon WLAN 7170 v1 3.96 - 4.99 /bin 4.5k - 65.7k
FRITZ!Box Fon WLAN 7170 v2 3.96 - 4.99 /bin 4.5k - 65.7k
FRITZ!Box Fon WLAN 7270 v1 4.44 - 4.99 /bin 4.5k - 5.8k
Speedport W 900V 4.21 - 4.57 /bin 5.8k - 65.7k
17 models use this command

Symbols

Daily updated index of all symbols of this command. Last update: 2024-04-25 07:20 GMT.

Firmware Symbol
3.87 - 4.99 fputpid
3.87 - 4.99 main
2 symbols for this command

SMW-Browser

Information is currently being retrieved from the backend.