Fix AutoLogin `printf` and `>` issues
Type of Change
- [x] Bug fix
- [x] Refactoring
- [x] Hotfix
Description
A LOT of bugs here. Someone (@guruswarupa) didn't test this.
Issues / other PRs related
- Resolves #654
Checklist
- [x] My code adheres to the coding and style guidelines of the project.
- [x] I have performed a self-review of my own code.
- [x] My changes generate no errors/warnings/merge conflicts.
@adamperkowski you'll have to go through and find the correct paths for each one, some of these are wrong
@nnyyxxxx Who did this? I'd like to have a friendly talk with them...
@nnyyxxxx Who did this? I'd like to have a friendly talk with them...
guru
@guruswarupa ...
https://wiki.archlinux.org/title/LightDM#Enabling_autologin
I was wrong
The bsd man pages are so much better than the ones for gnutils
I was wrong
The bsd man pages are so much better than the ones for gnutils
wrong
thats only for bsd
thats only for bsd
?
Which form are you talking about
thats only for bsd
?
Which form are you talking about
the empty arg u mentioned in your edited message, only works for linux, bsd on the otherhand it would not work on
thats only for bsd
?
Which form are you talking about
the empty arg u mentioned in your edited message, only works for linux, bsd on the otherhand it would not work on
sed -i'.old' 's/foo/bar/' test.txt produces a file named foo.txt.old
sed -i'' 's/foo/bar/' test.txt does not
sed -i'.old' 's/foo/bar/' test.txt
that will work on bsd, but if u take the argument away it wont
if there is no argument on linux it will work though, so you were only half right.
sed -i'.old' 's/foo/bar/' test.txt
that will work on bsd, but if u take the argument away it wont
Correct, that's why I suggested the change
I wasn't saying that I was wrong to suggest the change, just that the empty arg needed to be concatenated to the flag @nnyyxxxx
I wasn't saying that I was wrong to suggest the change, just that the empty arg needed to be concatenated to the flag @nnyyxxxx
i understand i was only saying that you were partially wrong
Ok, glad we agree... Right?
Co-authors for you :)
@guruswarupa ...
It seemed to work when those lines which you changed were echo. Later while changing it to printf, it broke. I did test on my system before adding it.
It seemed to work when those lines which you changed were echo. Later while changing it to printf, it broke. I did test on my system before adding it.
On its face that's incorrect. The single string argument being passed to sudo will fail because it will assume that it's looking for an executable named "echo '...' > ...", which fails regardless of whether you substitute echo for printf. You'd either have to run sudo bash -c "..." or do what @adamperkowski did and utilize sudo tee to get the permissions right
It seemed to work when those lines which you changed were echo. Later while changing it to printf, it broke. I did test on my system before adding it.
On its face that's incorrect. The single string argument being passed to sudo will fail because it will assume that it's looking for an executable named
"echo '...' > ...", which fails regardless of whether you substitute echo for printf. You'd either have to runsudo bash -c "..."or do what @adamperkowski did and utilizesudo teeto get the permissions right
i'd recommend against using sub shells