-
ant-x
ketas, Yes, I see that in the man page, but being 3:00 here, I must rush to bed!
-
ant-x
See ya all tomorrow!
-
ketas
hmm did it have reload too
-
ketas
:)
-
ketas
Sat Jul 6 03:02:36 EEST 2024
-
ketas
eh
-
ketas
right
-
ketas
it's suddenly night!
-
jbo
people
-
gh00p
If I know the MAC address of a device with a dynamic IP, how do I use `arping` to see if it's on the network?
-
polarian
so as a quick and easy backup for my zmirror, I can't yet afford a more robust version, but I got a spare 1TB SSD... my zmirror is HDD, but I only have 2.5" mounting left, no more room for 3.5". so I will use the SSD as a backup for snapshots. However I got two questions. If I remember correctly, snapshots are not encrypted (even if you got zfs encryption enabled), however if I geli the SSD then I
-
polarian
should have no issues with this right? and secondly... say there was a complete failure... the filesystem is gone... I had to completely reinstall... can you recover from snapshots or would you need a complete backup of all the data (say a tarball)?
-
monkeybusiness
.
-
nimaje
polarian: so you want to create a snapshot on your encrypted pool and then zfs send|recv it to a backup pool then whether or not the data on the backup pool is encrypted should depend on whether or not you created that one as an encrypted pool
-
polarian
my question was, say if you reinitalised the zpool as for example both disks were lost... can you zfs recv the old snapshots and fully rebuild... or would you need a complete backup?
-
polarian
say a tarball of all the data
-
nimaje
so you have the pools "zmirror" and "backup" and send|recv a snapshot from "zmirror" to "backup" and then loose "zmirror"? then all the data is on "backup", the snapshot itself is just a reference to a root node of a dataset at some point in time, with send|recv you send all data referenced by that snapshot and recreate the dataset on the target pool
-
ant-x
Hello, ketas and rwp. I have finally managed to connect my laptop to wifi, but I spent a lot of time bumping my head until I learned this bug was to blame: <
bugs.freebsd.org/bugzilla//show_bug.cgi?id=272145>. The Wiki says it affect only machines with >4GB RAM, but it is present of mine, with 4GB. I wanted to fix that information, but cannot seem to register. Is a Wiki for personnel only?
-
ant-x
...Is there a GUI-based network manager for FreeBSD, accessible to non tech-savvy persons?
-
nimaje
you have to request an account via email
wiki.freebsd.org/Wiki/About#How_To_Create_an_Account (probably as an anti-bot messure)
-
ant-x
Thank you.
-
ant-x
I have just installed networkmgr (<
freshports.org/net-mgmt/networkmgr>), and start it from the GUI terminal. The documentation, however, claims it should start automatically at login via XDG autostart, and indeed I have networkmgr.desktop under /usr/local/etc/xdg/autostart , but no autostart occurs. Can help me debug it?
-
ketas
why would it need to autostart?
-
ketas
for wifi i've used, hmm what was it
-
ketas
and i'm not surprised if wifi had actual driver or hw issue
-
ant-x
ketas, it's the GUI mangaer sitting in the tray. It should autostart to let the user activate/decacitve/connect the various networks.
-
ant-x
ketas, my RTW880 has acknowledged issued, yes -- see the referenced bug.
-
ketas
when the xfce laptop still worked hmm what was that thing i uses~d
-
ketas
was simpler
-
ketas
i guess you mean something that actively manages it?
-
ant-x
ketas, consider this question as a kind request to assist me in debuggin why XDF autostart won't start my manager.
-
ant-x
ketas, yes, with a graphical interface.
-
ketas
opal.com/src/wifimgr worked at that time and was only option back then
-
ketas
unsure about autostart
-
ketas
under what, too :p
-
ant-x
networkmgr (<
freshports.org/net-mgmt/networkmgr>) works as well, only it needs some additional setup to autostart.
-
ant-x
ketas, if you have Xfce, you will probably have /usr/local/etc/xdg/autostart with some .desktop files.
-
ketas
my laptop hardwarely broke so i don't currently have my fbsd xfce4 machine anymore
-
ketas
:/
-
ant-x
Ah, I see. I hope you didn't lose important data.
-
ketas
one hdd also broke, elsewhere, there i lost things
-
ketas
but not there
-
ant-x
I lack the discipline to backup my stuff.
-
ketas
oh i have backups, they are offsite too
-
ketas
just they have to be recent
-
nimaje
ant-x: well, you have to debug whatever handles that xdg autostart stuff for you
-
ant-x
nimaje, Yep. I looked into /var/log/messages, and saw nothing mentioning xdg
-
ketas
i think autostart has always worked for me
-
ketas
x logs elsewhere
-
ant-x
Oh..
-
ketas
at least back then it did :)
-
ant-x
I think it still does.
-
nimaje
ant-x: well, what do you use for your graphical sessions? what does it about that xdg autostart stuff?
-
ant-x
nimaje, I use Xfce and lightdm, if that's what you are asking.
-
ant-x
I read that Xfce supports XDG.
-
rwp
ant-x, I had some people recommend wifimgr to me but I have not tried it.
-
msiism
I'm wondering why stat(1) apparently ignores the time format I specified with the `-t` option. Here's an example:
paste.debian.net/plainh/25bd3e8f
-
rwp
msiism, The -t format was specified and overrode it.
-
rwp
msiism, No, I guess I don't know. I'll play with it.
-
rwp
When msiism returns maybe say to try "stat -f '%Sm' -t '%Y-%m-%d' hello" there.
-
rwp
I haven't played with FreeBSD stat(1) much before and now that I have I find it weird.
-
rwp
msiism, Maybe try this: stat -f '%Sm' -t '%Y-%m-%d' hello
-
rwp
I think I might even be able to explain the behavior now. But I can't rationalize it.
-
msiism
Weird…
-
msiism
I expected it to need Unix time to generate formatted time output…
-
msiism
Same on NetBSD, by the way.
-
rwp
So the way I understand it stat(1) uses the format as for what to print. Formats like %m are modification time as a number. Formats %Sm is modification time as a string, which uses the -t timefmt to comvert to a string. %m has no specifier so it defaults to %Dm or Decimal number output.
-
rwp
When printing as %m (aka %Dm) it's not a string so the timefmt is not consulted. AIUI.
-
msiism
Interesting.
-
rwp
With that in mind it means that stat -f '%Sa %Sm %Sc' -t %Y-%m-%d . will print all three of atime, mtime, ctime, each of which use the timefmt %Y-%m-%d. Or "2024-06-26 2024-07-06 2024-07-06" from that example.
-
rwp
The -t sets the string time format for all conversions of time to a string. And the -f fmt sets the fields that will be printed, some of which might be strings of time values.
-
rwp
I am still absorbing the ramifications of this design decision. I think I understand it now. But I can't say I like it.
-
msiism
Yeah, I just assumed that formatting sort of implies giving the formatting routine a "raw" value to work with.
-
msiism
I remember it being like that in uhh… Tcl, for example.
-
msiism
Alternatively, I could use Bash's `printf` it allows for converting Unix time into other formats. Pretty neat.
-
rwp
You will know I am a pedant when I mention that printf is not a bash-ism but is a standard utility. Bash implements it as a builtin for performance reasons. But every shell has it, or falls back to the external utility /usr/bin/printf which also implements it.
-
rwp
"man 1 printf" says "The printf command is expected to be compatible with the IEEE Std 1003.2 ("POSIX.2") specification." and also "The printf command appeared in 4.3BSD-Reno."
-
» rwp did warn you first! :-)
-
msiism
No problem. I have the POSIX documentation opened up in a browser tab just in case.
-
Hello71
which IEEE Std 1003.2 ("POSIX.2") specification printf command directive allows for converting Unix time into other formats?
-
msiism
No, that's the point.
-
msiism
Bash's builtin allows for that.
-
rwp
I am still missing how this is somehow something that bash is doing that is more than required by a shell. Something that we would hold bash as doing that is worth nothing. Because so far I think we should note the exact same thing about sh, ksh, mksh, zsh, and probably all of the rest too.
-
rwp
*hold bash as doign that is worth noting.
-
rwp
It seems like we could replace s/bash/sh/ and have the same statements exactly true too.
-
msiism
I just haven't checked other shell's printf implementation.
-
rwp
Okay. So my takeaway is that the main thing bash has in this case is marketing. Gotcha.
-
msiism
Well, it hasn't been marketed very well then, I guess.
-
rwp
I'll disclose that I do use bash as my main command line shell. I always use it because I prefer the command line editing of it.
-
rwp
I just couldn't see attributing something special about printf to bash as that just seemed like talking about a feature of a slanted roof being that it is self-draining. Well of course a slanted roof is self-draining! How could it be otherwise?
-
msiism
Well, I mean, saying that Bash's printf can do something that POSIX printf can't isn't a statement about other shell's printf implementation, is it?
-
rwp
Now we are converging! What feature is included in bash's printf that is not included elsewhere? I missed that somewhere along the way.
-
msiism
Bash's printf can take Unix time as an argument and convert it into a format you specify. Other shells might provide this as well. I just haven't cheked.
-
rwp
Okay. I begin to understand. Let me apologize because I thought we were talking about printf when I misunderstood that you were talking about bash's %(fmt)T feature, which I had not previously known about.
-
rwp
Example: bash: printf "%(%F %T)T\n" $(date +%s) => 2024-07-06 14:03:41
-
rwp
Okay. That's nifty.
-
msiism
Indeed.
-
rwp
In FreeBSD we would normally do this: date -r $(date +%s) "+%F %T"
-
rwp
2024-07-06 14:04:42
-
rwp
With GNU date: date -d @$(date +%s) "+%F %T" => 2024-07-06 14:05:25
-
msiism
Yeah, unfortunately, `date` options differ quite a lot between different Unix-y toolkits.
-
rwp
It's unfortunate that everyone has been including calculation translations in the date program rather than in a separate utility. A separate dedicated utility would make a lot more sense to me.
-
rwp
The portability problem one that I wish were converged is sed -i which is different in the most trivial and most annoying way. I wish that one were converged more than any other I have hit so far.
-
rwp
And I really feel FreeBSD failed on that one since perl's -i was the first implementer and subsequently all others did it the same way. Except for BSD sed which is different. Sigh.
-
msiism
I just never use sed -i. :)
-
msiism
The good thing about some shell's scope creep is that it makes for a bit of a compatibility layer.
-
rwp
There is that. That is true.
-
rwp
Which is one of the advantages forever of perl, then python, ruby, lua, and so on.
-
rwp
I mostly only ever write portable shell. Because... heterogeneous collection of everything all different. A maze of twisty little passages all the same.
-
msiism
The thing about other languages I've tried to use for what I do in Bash (or sometimes POSIX sh) is that they can't keep up with the immediate access to the surrounding system a Unix shell provides.
-
rwp
The shell is the best command and control language.
-
msiism
About portable shell: I mostly write Bash, taking advantage of what it has to offer because Bash itself is very portable and available on every system I use.
-
msiism
Most of the more prominent shells are, I guess.
-
rwp
That is a valid example. In contrast much of my shell is for provisioning systems. Bootstrapping them up. Which happens before bash could be installed. Or happens while bash might be broken while base is being upgraded.
-
msiism
I see.
-
rwp
My shell is bash. And once I made a mistake in order upgrading a system. And rebooted to the new system before upgrading bash to the new base. After reboot I found that I had absolutely no way to log into the system anymore as bash core dumped immediately due to the changed shared libraries that it required. (Not a bash problem.)
-
rwp
Since I have Boot Environments I simply rebooted to the previous one and used it to repair the new one. Then rebooted again. All good with little muss and only a little fuss.
-
msiism
A nice exercise for sure. :)
-
rwp
I am a huge fan of the shell though and before I step away from the keyboard I will cite this story which perhaps you already have seen and read. Enjoyable either way:
leancrew.com/all-this/2011/12/more-shell-less-egg
-
rwp
An epic story of McIlroy versus Knuth.
-
msiism
Interesting. I'm pretty sure I haven't read that yet. Thanks for the tip.
-
hussein1
can i ask what the motivation was for making rm -P have no effect?
-
llua
its in the next sentence of the man page
-
hussein1
why not make it do the same thing it did in 4.4BSD-Lite2 - isn't that a *better* form of backwards compatibility?
-
cracauer
For date/time math check out my `shellsupport` tool. Allows you to do math on seconds and get it in and out of common formats.
cons.org/cracauer/shellsupport.html
-
» msiism has a look.
-
rwp
hussein1, The rm -P feature was feature creep at the time which makes no sense whatsoever to do now with current file systems. Things just don't work the way they did back then and so overwriting a file three times to prevent it from being recovered does not make sense now.
-
rwp
Removing that feature creep is a good thing. Tools should do one thing and do that one thing well. If you want to overwrite the file before deleting them then you should do that useless action explicitly before rm'ing the file.
-
rwp
cracauer, I am looking at shellsupport now. (Well, probably tomorrow.) I don't see it as an available port? :-(
-
neirbowj
0/away
-
neirbowj
Ugh. Oops.
-
cracauer
rwp: have been too lazy to make a port because I thought that there must be similar capabilities in existing ports. But never found it.
-
cracauer
date/time arithmetic is always the stepchild.
-
ant-x
Is there an easy way to start FreeBSD witout Xfce? When I am working on some configuration and reboot frequently, the DE and WM get in the way.
-
rwp
cracauer, shellsupport compiled trivially easy here without warnings. Not having a port truly is not a problem for it. :-)
-
cracauer
Yeah, and it only has that one binary, nothing else to install.
-
rwp
ant-x, Is the rc.conf xfce enable variable xfce_enable? sysrc xfce_enable=NO
-
ant-x
rwp, Mine has onl lightdm_enable, and if I set it to "NO", DE still starts. Shall I add that variable?
-
ant-x
What funny thing I have had to write to control my laptom brightness via sensible increments: <
0x0.st/XB9i.sh> .