ASTRIBANK_IS_STARTING(8)

πŸ“¦
version 3.4.0 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– ASTRIBANK_IS_STARTING πŸ’–

okay bestie, welcome to the astribank_is_starting page, section 8 of the manual, and no this is not a drill 🫢


✨ NAME ✨

astribank_is_starting β€” mark / check if a Xorcom Astribank (xpp) is starting πŸ¦‹


🌸 SYNOPSIS 🌸

astribank_is_starting [-d] [-v] [-t timeout] <-a|-r|-w>

astribank_is_starting [-d] [-v]

astribank_is_starting -h

πŸ’… DESCRIPTION πŸ’…

So astribank_is_starting is an internal tool β€” like, it's not for you to play with at parties, it's the thing the various xpp scripts use behind the scenes. What does it do? Two jobs, and honestly it slays at both:

  • it marks that there may be an Astribank device currently initializing ✨
  • and it checks for that mark πŸ‘‘

Technically? The mark is a SysV semaphore. Yes fr fr, a semaphore. We'll get to why in a sec, bestie, don't worry.


πŸŽ€ OPTIONS πŸŽ€

  • -a β€” Add. Set the mark. Should return 0 unless there's an error. Simple as that πŸ’…
  • -r β€” Remove. Reset the mark. Should return 0 unless there's an error. Cleanup era 🧹
  • -ttimeout β€” Timeout. Sets the timeout value for the -w option. The default is 60 seconds. Tick tock ⏰
  • -w β€” Wait. Wait for the mark to be reset. Should return 0 unless there's an error. Just sitting there, patiently, main character energy 🫢

Without -a or -r: return 0 if the mark has been set, or a non-zero value otherwise. That's the vibe check right there 🌈

  • -d β€” Print debug information to stderr. For when you need to see everything πŸ‘€
  • -v β€” Verbose execution. It's giving "tell me more" πŸ’¬
  • -h β€” Displays usage message. The classic cry for help πŸ™ˆ

πŸ¦‹ FILES πŸ¦‹

  • /proc/sysvipc/sem β€” If set, the astribank should appear there with the ID 11211168 (0xAB11A0). Naturally the ID β€” or rather, the usage of a semaphore in the first place β€” is an implementation detail that may change. So like, don't get attached, bestie πŸ’€

πŸ‘‘ NOTES πŸ‘‘

astribank_is_starting is used to mark the fact that an Astribank may be currently reenumerating (technically: disconnecting and connecting as a new USB device) after loading the firmware. So the script that loads the firmware, /usr/share/dahdi/xpp_fxloader, uses this utility to set the mark. Iconic behaviour honestly ✨

The mark is reset by /usr/share/dahdi/waitfor_xpds, which is typically run by the DAHDI init script and waits for all Astribanks to finish loading. Teamwork, no cap 🀝

Q: Why do you use a semaphore?

A: because, unlike the filesystem, it is writable at any given time. Boom. Periodt. πŸ’…


😭 BUGS 😭

Option ordering matters. The -v and -d options should precede the actions (-a, -r and -w). The -ttimeout option should precede the -w option.

like, order matters bestie, don't fight it πŸ™


πŸ’œ SEE ALSO πŸ’œ


🌸 AUTHOR 🌸

This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.

On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.


k that's the whole page bestie, written 16 August 2009, and yeah, it's the ASTRIBANK_IS_STARTING(8) era and we're obsessed πŸ’–βœ¨πŸŽ€ go forth and check your semaphores πŸ¦‹