diff --git a/config/sources/sun7i.conf b/config/sources/sun7i.conf index 2474331a14..306adfd2cf 100644 --- a/config/sources/sun7i.conf +++ b/config/sources/sun7i.conf @@ -31,14 +31,16 @@ CPUMIN=480000 family_tweaks() { - # TODO: replace with udev rule - # default lirc configuration - sed -i '1i sed -i \x27s/DEVICE="\\/dev\\/input.*/DEVICE="\\/dev\\/input\\/\x27$str\x27"/g\x27 /etc/lirc/hardware.conf' \ - $SDCARD/etc/lirc/hardware.conf - sed -i '1i str=$(cat /proc/bus/input/devices | grep "H: Handlers=sysrq rfkill kbd event" | awk \x27{print $(NF)}\x27)' \ - $SDCARD/etc/lirc/hardware.conf - sed -i '1i # Cubietruck automatic lirc device detection by Igor Pecovnik' $SDCARD/etc/lirc/hardware.conf - sed -e 's/DEVICE=""/DEVICE="\/dev\/input\/event1"/g' -i $SDCARD/etc/lirc/hardware.conf - sed -e 's/DRIVER="UNCONFIGURED"/DRIVER="devinput"/g' -i $SDCARD/etc/lirc/hardware.conf - cp $SRC/config/lirc.conf.cubietruck $SDCARD/etc/lirc/lircd.conf + if [[ "${RELEASE}" != "stretch" ]]; then + # TODO: replace with udev rule + # default lirc configuration + sed -i '1i sed -i \x27s/DEVICE="\\/dev\\/input.*/DEVICE="\\/dev\\/input\\/\x27$str\x27"/g\x27 /etc/lirc/hardware.conf' \ + $SDCARD/etc/lirc/hardware.conf + sed -i '1i str=$(cat /proc/bus/input/devices | grep "H: Handlers=sysrq rfkill kbd event" | awk \x27{print $(NF)}\x27)' \ + $SDCARD/etc/lirc/hardware.conf + sed -i '1i # Cubietruck automatic lirc device detection by Igor Pecovnik' $SDCARD/etc/lirc/hardware.conf + sed -e 's/DEVICE=""/DEVICE="\/dev\/input\/event1"/g' -i $SDCARD/etc/lirc/hardware.conf + sed -e 's/DRIVER="UNCONFIGURED"/DRIVER="devinput"/g' -i $SDCARD/etc/lirc/hardware.conf + cp $SRC/config/lirc.conf.cubietruck $SDCARD/etc/lirc/lircd.conf + fi } diff --git a/lib/desktop.sh b/lib/desktop.sh index 49c4bf0d8e..88501f221b 100644 --- a/lib/desktop.sh +++ b/lib/desktop.sh @@ -20,13 +20,15 @@ install_desktop () # install optimized chromium configuration cp $SRC/config/chromium.conf $SDCARD/etc/chromium-browser/default fi - # install dedicated startup icons - cp $SRC/packages/blobs/desktop/icons/${DISTRIBUTION}.png $SDCARD/usr/share/pixmaps # install default desktop settings cp -R $SRC/packages/blobs/desktop/skel/. $SDCARD/etc/skel cp -R $SRC/packages/blobs/desktop/skel/. $SDCARD/root + # install dedicated startup icons + cp $SRC/packages/blobs/desktop/icons/${DISTRIBUTION,,}.png $SDCARD/usr/share/pixmaps + sed 's/xenial.png/'${DISTRIBUTION,,}'.png/' -i $SDCARD/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml + # install wallpapers mkdir -p $SDCARD/usr/share/backgrounds/xfce/ cp $SRC/packages/blobs/desktop/wallpapers/armbian*.jpg $SDCARD/usr/share/backgrounds/xfce/ diff --git a/lib/distributions.sh b/lib/distributions.sh index 8c615b34e6..2a65c22811 100644 --- a/lib/distributions.sh +++ b/lib/distributions.sh @@ -190,6 +190,24 @@ install_distribution_specific() stretch) # remove doubled uname from motd [[ -f $SDCARD/etc/update-motd.d/10-uname ]] && rm $SDCARD/etc/update-motd.d/10-uname + # rc.local is not existing in stretch but we might need it + cat <<-EOF >$SDCARD/etc/rc.local + #!/bin/sh -e + # + # rc.local + # + # This script is executed at the end of each multiuser runlevel. + # Make sure that the script will "exit 0" on success or any other + # value on error. + # + # In order to enable or disable this script just change the execution + # bits. + # + # By default this script does nothing. + + exit 0 + EOF + chroot $SDCARD /bin/bash -c "chmod +x /etc/rc.local; systemctl daemon-reload" ;; esac }