Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
calamares-settings-juno / usr / sbin / sources-final
Size: Mime:
#!/bin/sh
#

CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")

# Enable resolv.conf
rm $CHROOT/etc/resolv.conf

sed -i -e '/GRUB_CMDLINE_LINUX_DEFAULT/d' $CHROOT/etc/default/grub;
sed -i '/\GRUB_DISTRIBUTOR/a GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"' $CHROOT/etc/default/grub;

# Incrase swapfile to 2G
if [ -f $CHROOT/swapfile ];then
rm $CHROOT/swapfile;
dd if=$CHROOT/dev/zero of=$CHROOT/swapfile bs=1M count=2000 oflag=append conv=notrunc;
chmod 600 $CHROOT/swapfile
mkswap $CHROOT/swapfile;
fi

# Install Unl0kr (Tablets)
lukspart="$(blkid -t TYPE=crypto_LUKS | awk '{ if(NR==1) { gsub("\:",""); print $1 } }')"
luks="$(lsblk -o NAME -n -i -r $lukspart | tail -n 1)"
rootuuid="$(lsblk -n -s -o uuid,type $lukspart | grep 'part' | awk '{ print $1 }')"
touchscreen="$(dmesg | grep -ioh "touchscreen\|goodix" | head -1 | awk '{ print tolower($0) }')"

case "$touchscreen" in
    touchscreen)
    if lsblk -o type | grep -q 'crypt'; then
    echo "Installing Unl0kr";
    rm $CHROOT/etc/crypttab;
    echo "$luks UUID=$rootuuid none luks,keyscript=/usr/share/initramfs-tools/scripts/unl0kr-keyscript" >> $CHROOT/etc/crypttab;
    chroot $CHROOT update-initramfs -u -k all;
    fi
    ;;
esac

# Enable Phrog
PHOSH="$(echo $XDG_CURRENT_DESKTOP | grep -ioh 'phosh' | awk '{ print tolower($0) }')"
case $PHOSH in
phosh)
chroot $CHROOT systemctl disable phosh.service;
chroot $CHROOT systemctl enable greetd.service
;;
esac

exit 0