Commit 41b76d32 authored by Daniel Schulte's avatar Daniel Schulte

Modified liphook to no longer install 25adduser and no-bootloader-icon

parent 0685d048
......@@ -23,8 +23,8 @@ load_confmodule
log_begin_msg "$DESCRIPTION"
#copy desktop file for the no-bootloader-icon (required in 25adduser)
cp /lip/no-bootloader-icon/ubiquity-kdeui.desktop /root/usr/share/applications/kde4/
cp /lip/no-bootloader-icon/ubiquity-kdeui-no-bootloader.desktop /root/usr/share/applications/kde4/
#cp /lip/no-bootloader-icon/ubiquity-kdeui.desktop /root/usr/share/applications/kde4/
#cp /lip/no-bootloader-icon/ubiquity-kdeui-no-bootloader.desktop /root/usr/share/applications/kde4/
#TODO: install ubiquity here?
for hook in $(find "${LIP_HOOKS}" -name "*.hook.sh"); do
......
#!/bin/sh
PREREQ=""
DESCRIPTION="Adding live session user..."
prereqs()
{
echo "$PREREQ"
}
case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac
. /scripts/casper-functions
load_confmodule
log_begin_msg "$DESCRIPTION"
debconf_backup () {
local question backup
for question; do
backup="$question-casper-backup"
db_register debian-installer/dummy "$backup"
db_get "$question"
db_set "$backup" "$RET"
db_fget "$question" seen
db_fset "$backup" seen "$RET"
done
}
debconf_restore () {
local question backup
for question; do
backup="$question-casper-backup"
db_get "$backup"
db_set "$question" "$RET"
db_fget "$backup" seen
db_fset "$question" seen "$RET"
db_unregister "$backup"
done
}
debconf_backup \
passwd/root-password-crypted \
passwd/root-password passwd/root-password-again \
passwd/user-password-crypted \
passwd/user-password passwd/user-password-again \
passwd/user-fullname passwd/username passwd/user-uid
# U6aMy0wojraho is just a blank password
db_set passwd/root-password-crypted '*'
db_set passwd/user-password-crypted U6aMy0wojraho
db_set passwd/user-fullname "$USERFULLNAME"
db_set passwd/username "$USERNAME"
db_set passwd/user-uid 999
chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null
# Clear out debconf database again to avoid confusing ubiquity later.
debconf_restore \
passwd/root-password-crypted \
passwd/root-password passwd/root-password-again \
passwd/user-password-crypted \
passwd/user-password passwd/user-password-again \
passwd/user-fullname passwd/username passwd/user-uid
if [ -d /root/etc/sudoers.d/ ]; then
echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" > /root/etc/sudoers.d/casper
fi
LTS="$(cut -d' ' -f3 /root/cdrom/.disk/info 2>/dev/null)" || LTS=
RELEASE="$(cut -d' ' -f1-2 /root/cdrom/.disk/info 2>/dev/null | sed 's/-/ /')" || RELEASE=
if [ "$LTS" = "LTS" ] && [ -n "$RELEASE" ]; then
RELEASE="$RELEASE LTS"
fi
for file in /usr/share/applications/ubiquity.desktop /usr/share/applications/kde4/ubiquity-kdeui.desktop /usr/share/applications/kde4/ubiquity-kdeui-no-bootloader.desktop; do
if [ -f "/root/$file" ]; then
sed -i "s/RELEASE/$RELEASE/" "/root$file"
chroot /root install -d -o $USERNAME -g $USERNAME /home/$USERNAME/Desktop
chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file")
fi
done
if [ -L /root/home/$USERNAME/Examples ]; then
chroot /root install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/
mv /root/home/$USERNAME/Examples /root/home/$USERNAME/Desktop/
fi
if [ -f /root/home/$USERNAME/examples.desktop ]; then
chroot /root install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/
mv /root/home/$USERNAME/examples.desktop /root/home/$USERNAME/Desktop/
fi
#GDM
if [ -d /root/etc/gdm ]; then
sed -i '/^[UG]ID_MIN/s/\<1000$/ 999/' /root/etc/login.defs
fi
#Kubuntu
if [ -f "/root/usr/bin/plasma-desktop" ]; then
if [ -f "/root/usr/share/kde4/apps/khelpcenter/plugins/kubuntu/a_welcome.desktop" ]; then
chroot /root install -d -o $USERNAME -g $USERNAME /home/$USERNAME/Desktop
chroot /root install -D -o $USERNAME -g $USERNAME /usr/share/kde4/apps/khelpcenter/plugins/kubuntu/a_welcome.desktop /home/$USERNAME/Desktop/a_welcome.desktop
fi
fi
#Ubuntu MID wants to be installed with --automatic
if [ -f "/root/usr/share/ubuntu-mid-default-settings/mid-gui-start" ]; then
if [ -f "/root/usr/share/applications/ubiquity.desktop" ]; then
sed -i 's/--desktop/--automatic --desktop/' "/root/usr/share/applications/ubiquity.desktop"
fi
fi
#Ubuntu MID uses kourou, and the ubiquity icon should be easy to find
if [ -f "/root/usr/lib/hildon-desktop/kourou.py" ]; then
if [ -f "/root/etc/xdg/menus/home.menu" ]; then
sed -i '/<\/Include>/i\ <Filename>ubiquity.desktop</Filename>' "/root/etc/xdg/menus/home.menu"
fi
fi
log_end_msg
[Desktop Entry]
Type=Application
Version=1.0
# Do not translate the word "Kubuntu 13.10". It is used as a marker by casper.
Name=Install Kubuntu 13.10 (No Bootloader)
Name=Install Kubuntu 14.04 (No Bootloader)
Comment=Install this system permanently to your hard disk
Keywords=ubiquity;
Exec=ubiquity kde_ui --no-bootloader
......@@ -10,4 +9,4 @@ Icon=ubiquity-kde
Terminal=false
Categories=KDE;Qt;System;
OnlyShowIn=KDE;
X-Ubuntu-Gettext-Domain=ubiquity-desktop
\ No newline at end of file
X-Ubuntu-Gettext-Domain=ubiquity-desktop
[Desktop Entry]
Type=Application
Version=1.0
# Do not translate the word "Kubuntu 13.10". It is used as a marker by casper.
Name=Install Kubuntu 13.10
Name=Install Kubuntu 14.04
Comment=Install this system permanently to your hard disk
Keywords=ubiquity;
Exec=ubiquity kde_ui
......@@ -10,4 +9,4 @@ Icon=ubiquity-kde
Terminal=false
Categories=KDE;Qt;System;
OnlyShowIn=KDE;
X-Ubuntu-Gettext-Domain=ubiquity-desktop
\ No newline at end of file
X-Ubuntu-Gettext-Domain=ubiquity-desktop
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment