Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added variable for used user in chipsee-init.sh #10

Open
wants to merge 2 commits into
base: 6.6.20
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions preconfig/opt/chipsee/chipsee-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ exec 2>&1

export PATH=$PATH:/opt/vc/bin

# settings the user variable
USER=$(head -1 /boot/userconf | cut -d':' -f1)

FWLOC=$(/usr/lib/raspberrypi-sys-mods/get_fw_loc)

OVERLAYS=/boot/overlays
Expand Down Expand Up @@ -388,22 +391,22 @@ EOF
# systemctl --user start audioswitch.service
# systemctl --user enable audioswitch.service
# or use this shell to enable audioswitch.service
if [ ! -f /home/pi/.config/systemd/user/default.target.wants/audioswitch.service ]; then
mkdir -p /home/pi/.config/systemd/user/default.target.wants
ln -s /usr/lib/systemd/user/audioswitch.service /home/pi/.config/systemd/user/default.target.wants/audioswitch.service
ln -s /usr/lib/systemd/user/dpms-lcd.service /home/pi/.config/systemd/user/default.target.wants/dpms-lcd.service
chown pi:pi /home/pi/.config -R
if [ ! -f /home/$USER/.config/systemd/user/default.target.wants/audioswitch.service ]; then
mkdir -p /home/$USER/.config/systemd/user/default.target.wants
ln -s /usr/lib/systemd/user/audioswitch.service /home/$USER/.config/systemd/user/default.target.wants/audioswitch.service
ln -s /usr/lib/systemd/user/dpms-lcd.service /home/$USER/.config/systemd/user/default.target.wants/dpms-lcd.service
chown $USER:$USER /home/$USER/.config -R
reboot
fi

fi

# Backlight Control
chmod a+w /sys/class/backlight/pwm-backlight/brightness
if [ ! -f /home/pi/.config/systemd/user/default.target.wants/dpms-lcd.service ]; then
mkdir -p /home/pi/.config/systemd/user/default.target.wants
ln -s /usr/lib/systemd/user/dpms-lcd.service /home/pi/.config/systemd/user/default.target.wants/dpms-lcd.service
chown pi:pi /home/pi/.config -R
if [ ! -f /home/$USER/.config/systemd/user/default.target.wants/dpms-lcd.service ]; then
mkdir -p /home/$USER/.config/systemd/user/default.target.wants
ln -s /usr/lib/systemd/user/dpms-lcd.service /home/$USER/.config/systemd/user/default.target.wants/dpms-lcd.service
chown $USER:$USER /home/$USER/.config -R
reboot
fi

Expand Down