I take my shitposts very seriously.

  • 13 Posts
  • 1.24K Comments
Joined 2 年前
cake
Cake day: 2023年6月24日

help-circle






  • Tailscale. It does some UDP fuckery to bypass NAT and firewalls (most of the time) so you don’t even need to open any ports. You can run it on individual hosts to access them directly, and/or you can set it up on one device to advertise an entire subnet and have the client work like a split tunnel VPN. I don’t know about OpenWRT, but both pfSense and OpnSense have built-in Tailscale plugins.

    People are freaking out about their plan to go public, but for the moment, it’s a reliable, high quality service even on the free tier.

    I’ve also used Ngrok and Twingate to access my LAN from outside, but they simply use relay servers instead of Tailscale’s black magic fuckery.



  • rtxn@lemmy.worldMtolinuxmemes@lemmy.worldNever go full cringe
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    edit-2
    10 天前

    I’ve been learning Rust by going through The Book… there’s some wack-ass syntax in that language. I’ve mostly used C# and Python so most of it just looks weird… I can more or less understand what while let Some((_, top)) = iter.next() { ... } is doing, but .for_each(|((_, _, t), (_, _, b))| { ... } just looks like an abomination. And I mean the syntax in general, not this code in particular.



  • rtxn@lemmy.worldMtolinuxmemes@lemmy.worldThe end is near
    link
    fedilink
    arrow-up
    23
    arrow-down
    2
    ·
    11 天前

    I’ll just copy my comment from the other day.


    Some people think it handles too many low-level systems. It’s a valid concern because if systemd itself were to become compromised (like Xz Utils was) or a serious bug was introduced, all of the userland processes would be affected. People who are stuck in the 90s and think that the Unix philosophy is still relevant will also point out that it’s a needlessly complex software suite and we should all go back to writing initscripts in bash. The truth is, it’s complex because it needs to solve a complex problem.

    Red Hat, the owner of systemd, has also had its fair share of controversies. It’s a company that many distrust.

    Ultimately, those whose opinion mattered the most decided that systemd’s benefits outweigh the risks and drawbacks. Debian held a vote to determine the project’s future regarding init systems. Arch Linux replaced initscripts because systemd was simply better, and replicating and maintaining its features (like starting services once their dependencies are running) with initscripts would’ve been unjustifiably complicated.


  • Some people think it handles too many low-level systems. It’s a valid concern because if systemd itself were to become compromised (like Xz Utils was) or a serious bug was introduced, all of the userland processes would be affected. People who are stuck in the 90s and think that the Unix philosophy is still relevant will also point out that it’s a needlessly complex software suite and we should all go back to writing initscripts in bash.

    Red Hat, the owner of systemd, has also had its fair share of controversies. It’s a company that many distrust.

    Ultimately, those whose opinion mattered the most decided that systemd’s benefits outweigh the risks and drawbacks. Debian held a vote to determine the project’s future regarding init systems. Arch Linux replaced initscripts because systemd was simply better, and replicating and maintaining its features (like starting services once their dependencies are running) with initscripts would’ve been unjustifiably complicated.





  • Ansible is an abstraction layer over system utilities, shell, and other programs. You can specify what you want to happen, and it will figure out how to do it. For example, you can use the ansible.builtin.package module to specify which packages you want to be present, and Ansible will decide which specific package manager module should handle it and how.

    Ansible tasks are also idempotent – they are concerned with the end state instead of the action. Many of the modules (like the package module above) take a state parameter with the possible values of present or absent (instead of the more common “install” and “remove” actions). If the system’s state satisfies the task’s expected end state (e.g. the package is already present), the task will be skipped – unlike a shell script, which would simply re-run the entire script every time.

    Ansible also implements strict error checking. If a task fails, it won’t run any subsequent tasks on the host since the end states would be unpredictable.




  • Systemd, through the systemctl command, only manages the services. The service itself is defined in a unit file, and it can come from any source, even written manually. The unit file is a text file that describes what the service is, what commands or programs should be executed when it starts or stops (for sshd it’s /usr/bin/sshd -D), what other services or conditions are required (e.g. multi-user.target after the OS has entered multi-user mode), and much more.

    When a package installs a unit file, it will be installed to a subdirectory in /usr/lib/systemd, typically user or system, and when it is enabled, it will be symlinked to a subdirectory in /etc/systemd.

    OpenSSH itself, which provides sshd on most systems, is developed by the OpenBSD team and ported to other OSes by the OpenSSH Portability Team.
















OSZAR »