DebianNet(3pm)

πŸ“¦
version 4.54build1 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– DebianNet πŸ’–

okay bestie, so this is DebianNet(3pm) from the dpkg suite β€” a lil Perl module that lets you ✨create, remove, enable or disable entries in /etc/inetd.conf✨. yes THE inetd.conf. we're doing sysadmin stuff today and we're gonna slay it 🫢


✨ NAME ✨

DebianNet β€” create, remove, enable or disable entry in /etc/inetd.conf.


🌸 DESCRIPTION 🌸

so like, the whole vibe of this module is: you get a bunch of functions in DebianNet and you use them to add, remove, enable or disable entries in the /etc/inetd.conf file. that's it. that's the job πŸ’…

and the way that it's so considerate?? after /etc/inetd.conf gets changed, a SIGHUP signal is sent to the inetd process to make sure inetd actually picks up the new /etc/inetd.conf file. no cap, it tells inetd to re-read. iconic behavior honestly πŸ‘‘

the functions can also be used to add entries that are commented out by default. those get treated like normal entries β€” same energy, same rules. but (and this is the important part, bestie, listen) that also means: if you already have an entry that's commented out, you can't add an entry for the same service without removing the old one first. no sneaky duplicates. periodt.

also, a lil detail that matters: DebianNet treats entries that are commented out by a single '#' character as entries that have been commented out by a user. and it will not change such entries. hands off. respect the user's choices πŸ™ˆ

for shell scripts you can also use the update-inetd command. see update-inetd(8) for further information. iykyk πŸ“–


πŸŽ€ VARIABLES πŸŽ€

  • $DebianNet::INETD_CONF β€” contains a scalar filename to use as the inetd config file (e.g. for testing purposes).
    • Defaults to /etc/inetd.conf.
  • $DebianNet::SEP β€” contains the entry comment characters. this is only necessary if you have to deal with two (or more) services of the same name. like, only then, bestie.
    • Defaults to "#<off># " as the comment characters.
  • $DebianNet::MULTI β€” contains a boolean that decides whether to disable/remove more than one entry at a time. if you try to remove more than one entry at a time without using this option, the program will show a warning and will ask the user whether to continue. it's giving "are you SURE bestie" energy 😭
    • Defaults to false.
  • $DebianNet::VERBOSE β€” contains a boolean to select whether to explain verbosely what is being done. she's chatty, she tells you everything πŸ’¬
    • Defaults to false.

🌈 FUNCTIONS 🌈

  • $rc = DebianNet::add_service($newentry, $group) β€” add $newentry to the group $group of the /etc/inetd.conf file. if the entry already exists it will be enabled (it will also detect entries with different program options β€” she's observant like that). using $group is optional (the default group is the group OTHER). if the group does not exist, the entry will be placed at the end of the file.
    • Returns 1 on success, and -1 on failure. this function might call exit() due to debconf prompt answers. ⚠️ yes fr fr, it can just dip out on you because of a debconf prompt.
  • $rc = DebianNet::remove_service($entry) β€” remove $entry from /etc/inetd.conf. you can use a regular expression to remove the entry. regex girlies rise 🧚
    • Returns 1 on success, and -1 on failure.
  • $rc = DebianNet::disable_service($service, $pattern) β€” disable $service (e.g. "ftp") in /etc/inetd.conf. using $pattern is optional (see enable_service()).
    • Returns 1 on success, and -1 on failure.
  • $rc = DebianNet::enable_service($service, $pattern) β€” enable $service (e.g. "ftp") in /etc/inetd.conf. using $pattern is optional. it can be used to select a service. you only need this option if you have two (or more) services of the same name.
    • an example, because examples are everything: you have three ftp entries in the /etc/inetd.conf file (all disabled by default) and you want to enable the entry which uses the vsftpd daemon. to do this, use the pattern "vsftpd" (or any other regular expression that matches this entry).
    • Returns 1 on success, and -1 on failure.

⭐ CHANGES ⭐

πŸ’œ Version 1.13

  • New variables: $VERSION, $VERBOSE, $MULTI, $SEP, $INETD_CONF.
  • Deprecated variables: $version, $verbose, $multi, $sep, $inetdcf.
lowkey a glow-up era. out with the lowercase, in with the SCREAMING. deprecated doesn't mean deleted tho, so don't come for me πŸ’€

and that's the whole page bestie!! this beauty is version 4.54build1, dated 2026-02-02 🌸 go forth and manage your inetd.conf with main character energy, you absolute icon πŸ’…βœ¨πŸ‘‘

πŸ“¦ where this page comes from