LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File correct_live_install of Package kiwi-config-openSUSE (Project openSUSE:Factory:Live)

#! /bin/sh

# this script is called from the live installer once it is done (including 2nd stage)
# So the goal of this script is to fix whatever configs were changed for the live system

if test "$1" = usb; then

# /etc/sudoers hack to fix #297695 
# (Installation Live CD: no need to ask for password of root)
sed -i -e "s/ALL ALL=(ALL) NOPASSWD: ALL/ALL ALL=(ALL) ALL/" /etc/sudoers
chmod 0440 /etc/sudoers

# bug 544314, we need to use pam-config to correctly reset the gnome-keyring-pam config (see bug 723339)
pam_config_keyring=`rpm -q --scripts gnome-keyring-pam | grep -v " *#" | grep "pam-config *-a" | head -n 1`
test -n "$pam_config_keyring" && eval "$pam_config_keyring"

# reset pam config
pam-config -d --nullok

if test "$is_usb" = 0; then
  # remove unneeded /license.tar.gz
  rm /license.tar.gz

# remove langset stuff
rm /etc/langset.sh
rm -rf /etc/langset/

cd /
# patch -R -p0 < /etc/YaST2/policy.patch
rm /etc/YaST2/policy.patch
patch -R -p0 < /etc/YaST2/liveinstall.patch
rm /etc/YaST2/liveinstall.patch

# bug 391798
sed -i -e 's,DISPLAYMANAGER_AUTOLOGIN="linux",DISPLAYMANAGER_AUTOLOGIN="",'  /etc/sysconfig/displaymanager

if test "$is_usb" = 0; then
  # not good enough for usb
  # there we need something dynamic in firstboot
  /bin/cat /proc/sys/kernel/random/uuid > /etc/smolt/uuid
  rm /license.tar.gz

rm -f /var/lib/zypp/AnonymousUniqueId
rmdir /livecd || true
rmdir /read-only || true