~kennylevinsen/seatd-devel

1

Executing the script causes weird error

Details
Message ID
<CA+gXaa5vjxhOg0aTKtVDnVGoew3pPr-raVD1Noo3ny_ppoM84A@mail.gmail.com>
DKIM signature
missing
Download raw message
Hi,

Tried your script.

#!/bin/sh -eu

# Configuration
YOUR_USER=stevesr0
YOUR_GROUP=video

XDG_RUNTIME_DIR=/run/user/'id -u $YOUR_USER'
if [ $? -ne 0 ]
then
    echo "No such user $YOUR_USER"
    exit 1
fi

# Delete existing directory, create a new one and set permissions
rm -rf $XDG_RUNTIME_DIR
mkdir -p $XDG_RUNTIME_DIR
chown $YOUR_USER:$YOUR_GROUP $XDG_RUNTIME_DIR
chmod 700 $XDG_RUNTIME_DIR"

leads to an error message:

"rm: invalid option -- 'u'
Try 'rm --help' for more information."

I looked at rm --help,but didn't see a reference to a u option.
The only two "u" options are on the first line and on line 7 in
reference to the runtime dir ('id -u $YOUR_USER').

I checked what group seatd uses as you suggested and it was video.

Looked around on the internet, can't find an explanation for the error.

Any ideas/suggestions?

Thanks.

Steve Rinsler
Details
Message ID
<IM0PMR.MZOE7VRLZ4OS2@kl.wtf>
In-Reply-To
<CA+gXaa5vjxhOg0aTKtVDnVGoew3pPr-raVD1Noo3ny_ppoM84A@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
On Sat, Dec 10 2022 at 03:34:44 PM -05:00:00, Steve Rinsler 
<steve.rinsler@gmail.com> wrote:
> XDG_RUNTIME_DIR=/run/user/'id -u $YOUR_USER'

This has been copied incorrectly and should have been backtick rather 
than apostrophe.
Reply to thread Export thread (mbox)