Pacnew/Pacsave hook issues

Such as? I really don’t know what are you talking about. I can’t see any clear request to provide more data.

As to grep, the list is very, very long, but as said before, I removed my full username and there was no truncated version.

1 Like

That for a starter?

Somehow I missed it. Even when I was actively looking for it, I couldn’t find it… only the arrow up pointed to the proper message. I don’t know how, the whole replay was INVISIBLE when scrolling. Sorry.

Here is the output, if that is what you are looking for:

cut -d: -f1 /etc/passwd
root
bin
daemon
mail
ftp
http
uuidd
dbus
nobody
systemd-journal-gateway
systemd-timesync
systemd-network
systemd-bus-proxy
systemd-resolve
systemd-coredump
systemd-journal-remote
systemd-journal-upload
rpc
dnsmasq
nbd
avahi
polkitd
ntp
sddm
colord
git
usbmux
rtkit
mpd
michaldybczak
nvidia-persistenced
mysql
brscan-skey
deepin-daemon
lightdm
test
cups
postgres
nm-openvpn
geoclue
flatpak
tss
sndiod
fah
dhcpcd
openvpn
saned
systemd-oom
partimag
smbnetfs
rpcuser
fwupd
_talkd
passim

This time it worked, but for the same pacnew files that sudo DIFFPROG=meld pacdiff worked and then hanged up indefinitely. I even couldn’t close it with ctrl+c, so the only way was to close the terminal window.

Ok so we KNOW for a fact there is no reference to this user michaldy in the system now, so we KNOW it is a bug of some sort with the last command output and related commands in the script.

Now from the commands, I can’t see how it would cut the first word of last command output here… it’s weird.

Give output of last | head -1 | cut -d' ' -f1 directly (assuming your user would be the last one logged there)?

The command should cut at the first space so the full username theoretically.

last | head -1 | cut -d' ' -f1
michaldy

Ok so once again:

I don’t understand. I just did the command with last.

TYPE last AND GIVE THE OUTPUT.

Maybe you’ll understand better in caps.

No reason to yell. I had no idea there is command “last”. Note that we are not all developers here or command masters. I’m just a regular user.

last
michaldy pts/1        :1               Sat Jun 29 12:09   still logged in
michaldy pts/1        :1               Sat Jun 29 11:55 - 11:55  (00:00)
michaldy pts/1        :1               Sat Jun 29 10:59 - 10:59  (00:00)
michaldy pts/1        :1               Sat Jun 29 10:59 - 10:59  (00:00)
michaldy pts/1        :1               Sat Jun 29 09:29 - 10:15  (00:46)
michaldy pts/0        :1               Sat Jun 29 09:03   still logged in
michaldy tty1                          Sat Jun 29 09:03   still logged in
reboot   system boot  6.9.7-1-MANJARO  Sat Jun 29 09:03   still running
michaldy pts/0        :1               Fri Jun 28 09:05 - 01:18  (16:12)
michaldy tty1                          Fri Jun 28 09:05 - down   (16:12)
reboot   system boot  6.9.7-1-MANJARO  Fri Jun 28 09:05 - 01:18  (16:12)
michaldy pts/0        :1               Thu Jun 27 20:42 - 00:49  (04:07)
michaldy tty1                          Thu Jun 27 20:42 - down   (04:07)
reboot   system boot  6.9.7-1-MANJARO  Thu Jun 27 20:42 - 00:49  (04:07)
michaldy pts/1        :1               Thu Jun 27 20:21 - 20:41  (00:20)
michaldy pts/0        :1               Thu Jun 27 08:50 - 20:41  (11:51)
michaldy tty1                          Thu Jun 27 08:50 - down   (11:51)
reboot   system boot  6.9.6-1-MANJARO  Thu Jun 27 08:50 - 20:41  (11:51)
michaldy pts/0        :1               Wed Jun 26 08:59 - 00:08  (15:09)
michaldy tty1                          Wed Jun 26 08:59 - down   (15:09)
reboot   system boot  6.9.6-1-MANJARO  Wed Jun 26 08:59 - 00:08  (15:09)
michaldy pts/1        :1               Tue Jun 25 13:15 - 13:18  (00:02)
michaldy pts/0        :1               Tue Jun 25 10:13 - 01:25  (15:12)
michaldy tty1                          Tue Jun 25 10:13 - down   (15:12)
reboot   system boot  6.9.6-1-MANJARO  Tue Jun 25 10:13 - 01:25  (15:12)
michaldy pts/0        :1               Mon Jun 24 21:02 - 00:24  (03:21)
michaldy tty1                          Mon Jun 24 21:02 - down   (03:21)
reboot   system boot  6.9.6-1-MANJARO  Mon Jun 24 21:02 - 00:24  (03:22)
michaldy pts/0        :1               Mon Jun 24 14:12 - 21:01  (06:49)
michaldy tty1                          Mon Jun 24 14:12 - down   (06:49)
reboot   system boot  6.9.6-1-MANJARO  Mon Jun 24 14:12 - 21:02  (06:49)
michaldy pts/1        :1               Mon Jun 24 13:04 - 14:06  (01:02)
michaldy pts/0        :1               Mon Jun 24 09:54 - 14:12  (04:17)
michaldy tty1                          Mon Jun 24 09:54 - down   (04:18)
reboot   system boot  6.9.6-1-MANJARO  Mon Jun 24 09:54 - 14:12  (04:18)
michaldy pts/0        :1               Sun Jun 23 20:04 - 01:24  (05:20)
michaldy tty1                          Sun Jun 23 20:04 - down   (05:20)
reboot   system boot  6.9.6-1-MANJARO  Sun Jun 23 20:04 - 01:24  (05:20)
michaldy pts/0        :1               Sun Jun 23 09:29 - 19:11  (09:42)
michaldy tty1                          Sun Jun 23 09:29 - crash  (10:34)
reboot   system boot  6.9.6-1-MANJARO  Sun Jun 23 09:29 - crash  (10:34)
michaldy pts/0        :1               Sat Jun 22 12:59 - 01:06  (12:06)
michaldy tty1                          Sat Jun 22 12:59 - down   (12:06)
reboot   system boot  6.9.6-1-MANJARO  Sat Jun 22 12:59 - 01:06  (12:06)
michaldy pts/1        :1               Sat Jun 22 12:42 - 12:56  (00:14)
michaldy pts/0        :1               Sat Jun 22 09:31 - 12:59  (03:28)
michaldy tty1                          Sat Jun 22 09:31 - down   (03:28)
reboot   system boot  6.9.5-1-MANJARO  Sat Jun 22 09:30 - 12:59  (03:28)
michaldy pts/0        :1               Fri Jun 21 09:42 - 00:49  (15:07)
michaldy tty1                          Fri Jun 21 09:42 - down   (15:07)
reboot   system boot  6.9.5-1-MANJARO  Fri Jun 21 09:42 - 00:49  (15:07)
michaldy pts/1        :1               Thu Jun 20 16:34 - 17:40  (01:06)
michaldy pts/0        :1               Thu Jun 20 16:18 - 00:37  (08:19)
michaldy tty1                          Thu Jun 20 16:18 - down   (08:19)
reboot   system boot  6.9.5-1-MANJARO  Thu Jun 20 16:18 - 00:37  (08:19)
michaldy pts/1        :1               Thu Jun 20 16:03 - 16:17  (00:14)
michaldy pts/1        :1               Thu Jun 20 16:03 - 16:03  (00:00)
michaldy pts/0        :1               Thu Jun 20 09:27 - 16:17  (06:50)
michaldy tty1                          Thu Jun 20 09:27 - down   (06:50)
reboot   system boot  6.9.3-3-MANJARO  Thu Jun 20 09:26 - 16:17  (06:50)
michaldy pts/0        :1               Wed Jun 19 11:17 - 01:13  (13:56)
michaldy tty1                          Wed Jun 19 11:16 - down   (13:56)
reboot   system boot  6.9.3-3-MANJARO  Wed Jun 19 11:16 - 01:13  (13:56)
michaldy pts/0        :1               Wed Jun 19 08:35 - crash  (02:41)
michaldy tty1                          Wed Jun 19 08:35 - crash  (02:41)
reboot   system boot  6.9.3-3-MANJARO  Wed Jun 19 08:35 - crash  (02:41)
michaldy pts/0        :1               Tue Jun 18 08:32 - 01:32  (17:00)
michaldy tty1                          Tue Jun 18 08:31 - down   (17:00)
reboot   system boot  6.9.3-3-MANJARO  Tue Jun 18 08:31 - 01:32  (17:00)

wtmp zaczyna się Tue Jun 18 00:39:36 2024

OK everything is working as intended then, michaldy is exactly the intended result of the command.

It obviously worked, instead of ignoring once again what was clearly written, you did it this time. No need to be a developer or command master to follow a simple instruction which has been written multiple times. Just do it.

I’ll do some tests, to understand why it logs a “michaldy” user here in the last command, when the michaldy user doesn’t seem to exist from what we can see in the output of /etc/passwd file.

last is actually a command; something that was perhaps neglected to be explained sufficiently at the start;

last --help                                                                        ✔ 

Usage:
 last [options] [<username>...] [<tty>...]

Show a listing of last logged in users.

Options:
 -<number>            how many lines to show
 -a, --hostlast       display hostnames in the last column
 -d, --dns            translate the IP number back into a hostname
 -f, --file <file>    use a specific file instead of /var/log/wtmp
 -F, --fulltimes      print full login and logout times and dates
 -i, --ip             display IP numbers in numbers-and-dots notation
 -n, --limit <number> how many lines to show
 -R, --nohostname     don't display the hostname field
 -s, --since <time>   display the lines since the specified time
 -t, --until <time>   display the lines until the specified time
 -T, --tab-separated    use tabs as delimiters
 -p, --present <time> display who were present at the specified time
 -w, --fullnames      display full user and domain names
 -x, --system         display system shutdown entries and run level changes
     --time-format <format>  show timestamps in the specified <format>:
                               notime|short|full|iso

 -h, --help           display this help
 -V, --version        display version
1 Like

I guess it wasn’t clear enough the multiple times I copy/pasted it:

Thanks.

I just assumed that last is just a word and since it was used also within a longer command, where I gave the output, I didn’t notice it. If you don’t know a command and the common name is a word that fit in the sentence, it’s easy to be confused, especially for not English native speaker.

I just assumed you want output of last provided command, not the command “last” itself.

1 Like

That’s exactly why all commands are wrapped with the CODE tags, so they stand out as commands.

Semantics. He obviously understands now.

1 Like

Yeah, I noticed, but once again, if you don’t know that such a command even exists, even wrapping it in code markers is not clear enough. I see it, but don’t comprehend it, especially if it makes sense in the sentence, sort of. I thought this is a formatting error.

To clear something, my OS install is ca. 10 years old, so maybe some old settings or files set it, that the user is not registered fully. Or maybe not. Just thought it is worth mentioning.

The answer is simple. The last command doesn’t log the username entirely, it cuts it at specific length so changes are required in Manjaro Pacnew Checker for the script and the use of last should be stopped, it can’t work if username is long.

blabla, welcome to my ignore list now. Enough of you. Don’t reply to me. I’ll not see it anymore.

Have fun with that.

That is a nasty trap - is that documented somewhere?