You are not logged in.
Pages: 1
Greetings All,
Recently I did a full update ('sudo pacman -Syu') for my Arch Linux system, and have run into a strange problem.
Years ago, I created a PERL script that runs during the boot process.
This script locates encrypted disks (including one that may contain /home) that MIGHT be present when the system is started.
If any of these disks are present, a prompt for the password is presented, and the disk is mounted.
This script has worked flawlessly with a number of distros and kernels.
It also worked with Arch UNTIL this update.
The script uses the utility 'systemd-ask-password' to request the password from the user.
After this update, this routine was issuing an 'invalid argument' message, and bypassing the password prompt.
However, if the script was executed from a terminal AFTER KDE user sign-in, no error message was issued, and the password prompt succeeded.
What 'systemd-ask-password' was complaining about turned out to be 'esc' characters (used for color/highlighting).
Removal of these characters eliminated the error message & failure.
Does any kind soul have an idea as to what has been added to or removed from this update that would cause this issue?
I would like to return this formatting to the password prompt.
My eyesight is not very good, and NOT having highlight/color in a password prompt makes the message harder to see.
Current version info:
Plasma:6.8.0
KDE Frameworks: 6.31.0
QT Version:6.12.0
Kernel: 7.3.11-arch1-1 (64-bit)
Hardware:
Lenovo T430s
Intel 4 core CPU
Graphics:Intel HD 4000 + Nvidia
Thanx.
Richard Rosa
Offline
What 'systemd-ask-password' was complaining about turned out to be 'esc' characters (used for color/highlighting).
Removal of these characters eliminated the error message & failure.
Seeing the actual script might help - apparently the escape sequences bleed into the input?
Offline
Here is the troublesome section of code:
my $Bold = "\e[1m";
my $Green = "\e[32m";
my $Reset = "\e[0m";
my $msg = "$Bold$Green Enter password for $source:$mp$Reset ('quit' to bypass)";
my $pw = `systemd-ask-password --timeout=0 "$msg" `;Bypassed error by changing $msg to:
my $msg = "Enter password for $source:$mp ('quit' to bypass)";This worked fine before the update.
It also works ok from a KDE 'Konsole' without the changes
Rich
Offline
Does it work w/ any of
my $msg = "\e[1;32mEnter password for $source:$mp\e[0m ('quit' to bypass)";my $msg = "\033[1;32mEnter password for $source:$mp\033[0m ('quit' to bypass)";my $msg = "\x1b[1;32mEnter password for $source:$mp\x1b[0m ('quit' to bypass)";?
Offline
Nice idea, but all variations produce the same results.
What is also weird is that esc codes DO work if i issue them in a PRINT statement:
my $msg = "$Bold$Green Enter password for $source:$mp$Reset ('quit' to bypass)";
print "$msg\n";This is my workaround (for now). Not as nice, but a decent solution.
I suspect something strange is going on with the TTY setup. Either something added, or something removed.
This update was done on my laptop (which I use occasionally).
Before I apply ANY updates to my main machine, I need to figure out what this issue is.
Thanx for your help.
Rich
Offline
I suspect something strange is going on with the TTY setup.
esc codes DO work if i issue them in a PRINT statement
I need to figure out what this issue is
=> /var/log/pacman.log, probably a systemd update?
Despite
if the script was executed from a terminal AFTER KDE user sign-in, no error message was issued, and the password prompt succeeded.
Does the message actually get printed (in color)?
Where exactly do you get the "issuing an 'invalid argument' message"?
Offline
a PERL script that runs during the boot process.
How does it run during boot process? From systemd service or somehow else? Does it ask password via plymouth in this case?
The script uses the utility 'systemd-ask-password' to request the password from the user.
After this update, this routine was issuing an 'invalid argument' message, and bypassing the password prompt.
What packages were updated? What systemd and plymouth versions were installed before the update?
Offline
Pages: 1