DEVICE-TABLE(1)

πŸ“¦ version 2.2.11, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– DEVICE-TABLE(1) πŸ’–

okay so bestie, welcome to the device-table.pl manual β€” this is the User Contributed Perl Documentation page for it, and it's lowkey one of those little scripts that does one job and does it iconically. Here's the whole vibe. 🫢


✨ Name ✨

device-table.pl β€” it parses simple device tables and passes them along to mknod. that's it. that's the whole girlboss job description. πŸ’…


🌸 Synopsis 🌸

device-table.pl [-n|--dry-run] [-d DIR] [-f FILE]
device-table.pl -?|-h|--help|--version

like, that's the entire interface. two modes: do the thing, or tell me about the thing. no cap. ✨


πŸŽ€ Options πŸŽ€

so by default, device-table.pl writes out the device nodes in the current working directory. if you want them somewhere else, use the directory option. she's flexible, she just needs to be told. πŸ¦‹

  • -n, --dry-run β€” the dry-run option, bestie! it shows you the commands that would be run, without actually running them. it's giving look-but-don't-touch energy. perfect for a vibe check before you commit. πŸ‘€
  • -d DIR β€” the directory option</... wait no, the directory option β€” use it to write the device nodes out somewhere other than the current working directory. DIR is the place. πŸ’–
  • -f FILE β€” the file option, which overrides the default file. and listen: multistrap already contains a default device-table file, and the default is /usr/share/doc/multistrap/examples/device_table.txt. so if you don't like that one, you point it at your own with -f. ✨
  • no-fakeroot β€” so here's the tea β˜•: device nodes need fakeroot or another way to use root access. if device-table.pl is already being run under fakeroot or an equivalent, then the existing fakeroot session gets used β€” she'll just hop on the one you're already on. alternatively, use the no-fakeroot option to drop the internal fakeroot usage entirely. 🧚
  • -?, -h, --help, --version β€” the "just tell me what's going on" flags. you know the drill. 🌈
⚠️ ok important, don't skip this one: fakeroot does not support changing the actual ownerships. so for that, you gotta run the final packing into a tarball under fakeroot as well, or just use "sudo" when running device-table.pl. this is a real caveat, not a drill, fr fr. 😭

🌈 Device table format 🌈

okay so the format section, and honestly it's giving strict:

device table files are tab separated value files (TSV). all lines in the device table must have exactly 10 entries, each separated by a single tab. the one exception? comments β€” and those must start with #. that's the whole rule, bestie, no wiggle room. πŸ’…

device table entries take the form of:

<name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>

where name is the file name, and type can be one of:

f A regular file
d Directory
s symlink
h hardlink
c Character special device file
b Block special device file
p Fifo (named pipe)

now, symlinks and hardlinks are extensions to the device table β€” they're just for device-table.pl, so heads up: other device table parsers might not handle these types. not everyone is on our level, iykyk. πŸ™ˆ

for the symlink command specifically, the first field is the existing target of the symlink, and the third field is the full path of the symlink itself. e.g.

/proc/self/fd/0 s /dev/stdin - - - - - - -

see also πŸ‘‰ http://wiki.debian.org/DeviceTableScripting


and that's the whole page, gorgeous. this one's perl v5.30.0, dated 2020-03-22, and it ate. πŸ’–βœ¨πŸŽ€ bye bestie, go make some device nodes responsibly πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from