Skip to content
Snippets Groups Projects
Commit fb2a9689 authored by Valentin Bruch's avatar Valentin Bruch
Browse files

linuxparty.sh: bug fixes; new post-oem-lip copies linuparty.sh to Desktop

parent 865884b4
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ reboot
# remove old kernel versions (here for version 26):
sudo apt purge linux-headers-5.4.0-26 linux-headers-5.4.0-26-generic linux-image-5.4.0-26-generic linux-modules-5.4.0-26-generic linux-modules-extra-5.4.0-26-generic
sudo apt clean
sudo journalctl --vacuum-size 1M
# preinstalled packages
sudo apt install git vim htop virtualbox-guest-x11
# clear swap (optional)
......@@ -57,9 +58,11 @@ sudo mount /dev/nbd1p5 mnt1
sudo cp -a mnt0/* mnt1
sync
# Copy LIP script
mkdir mnt1/opt/lip
sudo mkdir mnt1/opt/lip
sudo cp linuxparty.sh packages mnt1/opt/lip
sudo chmod 755 mnt1/opt/lip/linuxparty.sh
sudo cp post-oem-lip mnt1/usr/lib/oem-config/post-install
sudo chmod 755 mnt1/usr/lib/oem-config/post-install
sudo umount mnt0 mnt1
# Delete network block devices
sudo qemu-nbd -d /dev/nbd0
......
#!/bin/bash
# !! Angepasste Version zur Benutzung in einer VM !!
# Install useful packages in a newly installed (or imported) VM.
# This script requires a file "packages" in the same directory, which should
# contain a list of packages with each line of the format
# flags|package name(s)|description
set -e
# Root sicherstellen
if [[ "$EUID" -ne 0 ]]
then
for GUISU in gksu kdesu pgexec ''; do
for GUISU in gksu kdesu pkexec ''; do
command -v "$GUISU" 2>&1 > /dev/null && break
done
if [ -n "$DISPLAY" ] && [ -n "$GUISU" ]; then
$GUISU "$(realpath "$0")"
$GUISU env DISPLAY="$DISPLAY" XAUTHORITY="$XAUTHORITY" "$(realpath "$0")"
exit "$?"
else
echo "Du bist nicht ROOT ... verwende \"sudo bash $0\" !"
......@@ -17,7 +24,6 @@ then
fi
fi
#options for GUI are kdialog zenity none
if [ -z "$GUI" ]; then
echo "\$GUI is not set. Auto detecting GUI..."
......
#!/bin/bash
# This script copies linuxparty.sh and packages from $BASEDIR to $HOME (of
# every user). $BASEDIR and its files will be deleted if files were copied
# successfully. This script should be run immediately after oem-config.
# Put this file in /usr/lib/oem-config/post-install/ and make it executable.
# The file name of this script may not contain a dot, because ... ubiquity is
# very strange. Put linuxparty.sh and packages list in /opt/lip/linuxparty.sh
# and make linuxparty.sh executable.
set -e
BASEDIR='/opt/lip'
DELETE=
for user in $(ls /home); do
mkdir -p "/home/$user/Desktop"
cp "$BASEDIR/linuxparty.sh" "$BASEDIR/packages" "/home/$user/Desktop/" || continue
chown -R "$user:$user" "/home/$user/Desktop"
DELETE=1
done
if [ -n "$DELETE" ]; then
rm "$BASEDIR/linuxparty.sh" "$BASEDIR/packages"
rmdir "$BASEDIR"
fi
rm -d "$0"
rmdir /usr/lib/oem-config/post-install
rmdir /usr/lib/oem-config
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment