<div dir="ltr">Resend<div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Thomas Gilliard</b> <span dir="ltr"><<a href="mailto:satellitgo@gmail.com">satellitgo@gmail.com</a>></span><br>Date: Fri, Jan 27, 2017 at 2:17 PM<br>Subject: [Sugar-devel] f26 soas logs in to liveuser- should be "name ( )"<br>To: Sugar-dev Devel <<a href="mailto:sugar-devel@lists.sugarlabs.org">sugar-devel@lists.sugarlabs.org</a>><br>Cc: <a href="mailto:satellitgo@gmail.com">satellitgo@gmail.com</a><br><br><br>f26 soas logs in to liveuser- ;should boot to  "name (      )"<br>
<br>
clicking on login with no password works<br>
<br>
How can the current kickstart be fixed to go back to expected behavior?<br>
<br>
Tom Gilliard<br>
<br>
satellit<br>
<br>
<a href="https://kojipkgs.fedoraproject.org//work/tasks/9434/17409434/koji-image-f26-build-17409434.ks" rel="noreferrer" target="_blank">https://kojipkgs.fedoraproject<wbr>.org//work/tasks/9434/<wbr>17409434/koji-image-f26-build-<wbr>17409434.ks</a><br>
<br>
#version=DEVEL<br>
# X Window System configuration information<br>
xconfig  --startxonboot<br>
# Keyboard layouts<br>
keyboard 'us'<br>
# Root password<br>
rootpw --iscrypted --lock locked<br>
# Use network installation<br>
url --url="<a href="http://kojipkgs.fedoraproject.org/compose/rawhide/Fedora-Rawhide-20170125.n.0/compose/Everything/$basearch/os" rel="noreferrer" target="_blank">http://kojipkgs.fedorap<wbr>roject.org/compose/rawhide/<wbr>Fedora-Rawhide-20170125.n.0/<wbr>compose/Everything/$basearch/<wbr>os</a>"<br>
# System language<br>
lang en_US.UTF-8<br>
# Firewall configuration<br>
firewall --enabled --service=mdns,presence<br>
repo --name="koji-override-0" --baseurl=<a href="http://kojipkgs.fedoraproject.org/compose/rawhide/Fedora-Rawhide-20170125.n.0/compose/Everything/$basearch/os" rel="noreferrer" target="_blank">http://kojipkgs.fedo<wbr>raproject.org/compose/rawhide/<wbr>Fedora-Rawhide-20170125.n.0/<wbr>compose/Everything/$basearch/<wbr>os</a><br>
# Shutdown after installation<br>
shutdown<br>
# Network information<br>
network  --bootproto=dhcp --device=link --activate<br>
# System timezone<br>
timezone US/Eastern<br>
# System authorization information<br>
auth --useshadow --passalgo=sha512<br>
# SELinux configuration<br>
selinux --enforcing<br>
<br>
# System services<br>
services --disabled="sshd" --enabled="NetworkManager,Mode<wbr>mManager"<br>
# System bootloader configuration<br>
bootloader --location=none<br>
# Clear the Master Boot Record<br>
zerombr<br>
# Partition clearing information<br>
clearpart --all<br>
# Disk partitioning information<br>
part / --fstype="ext4" --size=5120<br>
<br>
%post<br>
# FIXME: it'd be better to get this installed from a package<br>
cat > /etc/rc.d/init.d/livesys << EOF<br>
#!/bin/bash<br>
#<br>
# live: Init script for live image<br>
#<br>
# chkconfig: 345 00 99<br>
# description: Init script for live image.<br>
### BEGIN INIT INFO<br>
# X-Start-Before: display-manager chronyd<br>
### END INIT INFO<br>
<br>
. /etc/init.d/functions<br>
<br>
if ! strstr "\`cat /proc/cmdline\`" rd.live.image || [ "\$1" != "start" ]; then<br>
    exit 0<br>
fi<br>
<br>
if [ -e /.liveimg-configured ] ; then<br>
    configdone=1<br>
fi<br>
<br>
exists() {<br>
    which \$1 >/dev/null 2>&1 || return<br>
    \$*<br>
}<br>
<br>
livedir="LiveOS"<br>
for arg in \`cat /proc/cmdline\` ; do<br>
  if [ "\${arg##rd.live.dir=}" != "\${arg}" ]; then<br>
    livedir=\${arg##rd.live.dir=}<br>
    return<br>
  fi<br>
  if [ "\${arg##live_dir=}" != "\${arg}" ]; then<br>
    livedir=\${arg##live_dir=}<br>
    return<br>
  fi<br>
done<br>
<br>
# enable swaps unless requested otherwise<br>
swaps=\`blkid -t TYPE=swap -o device\`<br>
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps" ] ; then<br>
  for s in \$swaps ; do<br>
    action "Enabling swap partition \$s" swapon \$s<br>
  done<br>
fi<br>
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f /run/initramfs/live/\${livedir<wbr>}/swap.img ] ; then<br>
  action "Enabling swap file" swapon /run/initramfs/live/\${livedir<wbr>}/swap.img<br>
fi<br>
<br>
mountPersistentHome() {<br>
  # support label/uuid<br>
  if [ "\${homedev##LABEL=}" != "\${homedev}" -o "\${homedev##UUID=}" != "\${homedev}" ]; then<br>
    homedev=\`/sbin/blkid -o device -t "\$homedev"\`<br>
  fi<br>
<br>
  # if we're given a file rather than a blockdev, loopback it<br>
  if [ "\${homedev##mtd}" != "\${homedev}" ]; then<br>
    # mtd devs don't have a block device but get magic-mounted with -t jffs2<br>
    mountopts="-t jffs2"<br>
  elif [ ! -b "\$homedev" ]; then<br>
    loopdev=\`losetup -f\`<br>
    if [ "\${homedev##/run/initramfs/li<wbr>ve}" != "\${homedev}" ]; then<br>
      action "Remounting live store r/w" mount -o remount,rw /run/initramfs/live<br>
    fi<br>
    losetup \$loopdev \$homedev<br>
    homedev=\$loopdev<br>
  fi<br>
<br>
  # if it's encrypted, we need to unlock it<br>
  if [ "\$(/sbin/blkid -s TYPE -o value \$homedev 2>/dev/null)" = "crypto_LUKS" ]; then<br>
    echo<br>
    echo "Setting up encrypted /home device"<br>
    plymouth ask-for-password --command="cryptsetup luksOpen \$homedev EncHome"<br>
    homedev=/dev/mapper/EncHome<br>
  fi<br>
<br>
  # and finally do the mount<br>
  mount \$mountopts \$homedev /home<br>
  # if we have /home under what's passed for persistent home, then<br>
  # we should make that the real /home.  useful for mtd device on olpc<br>
  if [ -d /home/home ]; then mount --bind /home/home /home ; fi<br>
  [ -x /sbin/restorecon ] && /sbin/restorecon /home<br>
  if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi<br>
}<br>
<br>
findPersistentHome() {<br>
  for arg in \`cat /proc/cmdline\` ; do<br>
    if [ "\${arg##persistenthome=}" != "\${arg}" ]; then<br>
      homedev=\${arg##persistenthome<wbr>=}<br>
      return<br>
    fi<br>
  done<br>
}<br>
<br>
if strstr "\`cat /proc/cmdline\`" persistenthome= ; then<br>
  findPersistentHome<br>
elif [ -e /run/initramfs/live/\${livedir<wbr>}/home.img ]; then<br>
  homedev=/run/initramfs/live/\$<wbr>{livedir}/home.img<br>
fi<br>
<br>
# if we have a persistent /home, then we want to go ahead and mount it<br>
if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ] ; then<br>
  action "Mounting persistent /home" mountPersistentHome<br>
fi<br>
<br>
if [ -n "\$configdone" ]; then<br>
  exit 0<br>
fi<br>
<br>
# add fedora user with no passwd<br>
action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser<br>
passwd -d liveuser > /dev/null<br>
usermod -aG wheel liveuser > /dev/null<br>
<br>
# Remove root password lock<br>
passwd -d root > /dev/null<br>
<br>
# turn off firstboot for livecd boots<br>
systemctl --no-reload disable firstboot-text.service 2> /dev/null || :<br>
systemctl --no-reload disable firstboot-graphical.service 2> /dev/null || :<br>
systemctl stop firstboot-text.service 2> /dev/null || :<br>
systemctl stop firstboot-graphical.service 2> /dev/null || :<br>
<br>
# don't use prelink on a running live image<br>
sed -i 's/PRELINKING=yes/PRELINKING=n<wbr>o/' /etc/sysconfig/prelink &>/dev/null || :<br>
<br>
# turn off mdmonitor by default<br>
systemctl --no-reload disable mdmonitor.service 2> /dev/null || :<br>
systemctl --no-reload disable mdmonitor-takeover.service 2> /dev/null || :<br>
systemctl stop mdmonitor.service 2> /dev/null || :<br>
systemctl stop mdmonitor-takeover.service 2> /dev/null || :<br>
<br>
# don't enable the gnome-settings-daemon packagekit plugin<br>
gsettings set org.gnome.software download-updates 'false' || :<br>
<br>
# don't start cron/at as they tend to spawn things which are<br>
# disk intensive that are painful on a live image<br>
systemctl --no-reload disable crond.service 2> /dev/null || :<br>
systemctl --no-reload disable atd.service 2> /dev/null || :<br>
systemctl stop crond.service 2> /dev/null || :<br>
systemctl stop atd.service 2> /dev/null || :<br>
<br>
# Don't sync the system clock when running live (RHBZ #1018162)<br>
sed -i 's/rtcsync//' /etc/chrony.conf<br>
<br>
# Mark things as configured<br>
touch /.liveimg-configured<br>
<br>
# add static hostname to work around xauth bug<br>
# <a href="https://bugzilla.redhat.com/show_bug.cgi?id=679486" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/sh<wbr>ow_bug.cgi?id=679486</a><br>
# the hostname must be something else than 'localhost'<br>
# <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1370222" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/sh<wbr>ow_bug.cgi?id=1370222</a><br>
echo "localhost-live" > /etc/hostname<br>
<br>
EOF<br>
<br>
# bah, hal starts way too late<br>
cat > /etc/rc.d/init.d/livesys-late << EOF<br>
#!/bin/bash<br>
#<br>
# live: Late init script for live image<br>
#<br>
# chkconfig: 345 99 01<br>
# description: Late init script for live image.<br>
<br>
. /etc/init.d/functions<br>
<br>
if ! strstr "\`cat /proc/cmdline\`" rd.live.image || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then<br>
    exit 0<br>
fi<br>
<br>
exists() {<br>
    which \$1 >/dev/null 2>&1 || return<br>
    \$*<br>
}<br>
<br>
touch /.liveimg-late-configured<br>
<br>
# read some variables out of /proc/cmdline<br>
for o in \`cat /proc/cmdline\` ; do<br>
    case \$o in<br>
    ks=*)<br>
        ks="--kickstart=\${o#ks=}"<br>
        ;;<br>
    xdriver=*)<br>
        xdriver="\${o#xdriver=}"<br>
        ;;<br>
    esac<br>
done<br>
<br>
# if liveinst or textinst is given, start anaconda<br>
if strstr "\`cat /proc/cmdline\`" liveinst ; then<br>
   plymouth --quit<br>
   /usr/sbin/liveinst \$ks<br>
fi<br>
if strstr "\`cat /proc/cmdline\`" textinst ; then<br>
   plymouth --quit<br>
   /usr/sbin/liveinst --text \$ks<br>
fi<br>
<br>
# configure X, allowing user to override xdriver<br>
if [ -n "\$xdriver" ]; then<br>
   cat > /etc/X11/xorg.conf.d/00-xdrive<wbr>r.conf <<FOE<br>
Section "Device"<br>
    Identifier    "Videocard0"<br>
    Driver    "\$xdriver"<br>
EndSection<br>
FOE<br>
fi<br>
<br>
EOF<br>
<br>
chmod 755 /etc/rc.d/init.d/livesys<br>
/sbin/restorecon /etc/rc.d/init.d/livesys<br>
/sbin/chkconfig --add livesys<br>
<br>
chmod 755 /etc/rc.d/init.d/livesys-late<br>
/sbin/restorecon /etc/rc.d/init.d/livesys-late<br>
/sbin/chkconfig --add livesys-late<br>
<br>
# enable tmpfs for /tmp<br>
systemctl enable tmp.mount<br>
<br>
# make it so that we don't do writing to the overlay for things which<br>
# are just tmpdirs/caches<br>
# note <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1135475" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/sh<wbr>ow_bug.cgi?id=1135475</a><br>
cat >> /etc/fstab << EOF<br>
vartmp   /var/tmp    tmpfs   defaults   0  0<br>
EOF<br>
<br>
# work around for poor key import UI in PackageKit<br>
rm -f /var/lib/rpm/__db*<br>
releasever=$(rpm -q --qf '%{version}\n' --whatprovides system-release)<br>
basearch=$(uname -i)<br>
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-f<wbr>edora-$releasever-$basearch<br>
echo "Packages within this LiveCD"<br>
rpm -qa<br>
# Note that running rpm recreates the rpm db files which aren't needed or wanted<br>
rm -f /var/lib/rpm/__db*<br>
<br>
# go ahead and pre-make the man -k cache (#455968)<br>
/usr/bin/mandb<br>
<br>
# make sure there aren't core files lying around<br>
rm -f /core*<br>
<br>
# remove random seed, the newly installed instance should make it's own<br>
rm -f /var/lib/systemd/random-seed<br>
<br>
# convince readahead not to collect<br>
# FIXME: for systemd<br>
<br>
echo 'File created by kickstart. See systemd-update-done.service(8)<wbr>.' \<br>
    | tee /etc/.updated >/var/.updated<br>
<br>
# Drop the rescue kernel and initramfs, we don't need them on the live media itself.<br>
# See bug 1317709<br>
rm -f /boot/*-rescue*<br>
<br>
# Disable network service here, as doing it in the services line<br>
# fails due to RHBZ #1369794<br>
/sbin/chkconfig network off<br>
<br>
# Remove machine-id on pre generated images<br>
rm -f /etc/machine-id<br>
touch /etc/machine-id<br>
<br>
%end<br>
<br>
%post --nochroot<br>
cp $INSTALL_ROOT/usr/share/licens<wbr>es/*-release/* $LIVE_ROOT/<br>
<br>
# only works on x86, x86_64<br>
if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then<br>
  if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi<br>
  cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS<br>
fi<br>
<br>
%end<br>
<br>
%post<br>
<br>
# Rebuild initrd for Sugar boot screen<br>
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}<wbr>\n')<br>
/usr/sbin/plymouth-set-default<wbr>-theme sugar<br>
/sbin/dracut -f /boot/initramfs-$KERNEL_VERSIO<wbr>N.img $KERNEL_VERSION<br>
<br>
# Note that running rpm recreates the rpm db files which aren't needed or wanted<br>
rm -f /var/lib/rpm/__db*<br>
<br>
# Get proper release naming in the control panel<br>
cat >> /boot/olpc_build << EOF<br>
Sugar on a Stick<br>
EOF<br>
cat /etc/fedora-release >> /boot/olpc_build<br>
<br>
# Add our activities to the favorites<br>
cat > /usr/share/sugar/data/activiti<wbr>es.defaults << EOF<br>
org.laptop.WebActivity<br>
org.laptop.HelpActivity<br>
org.laptop.Chat<br>
org.laptop.sugar.ReadActivity<br>
org.laptop.sugar.GetBooksActiv<wbr>ity<br>
org.laptop.AbiWordActivity<br>
org.laptop.TurtleArtActivity<br>
org.laptop.Calculate<br>
org.laptop.Clock<br>
org.laptop.ImageViewerActivity<br>
org.laptop.Memorize<br>
org.laptop.physics<br>
org.laptop.Pippy<br>
org.laptop.RecordActivity<br>
org.laptop.Oficina<br>
org.laptop.StopWatchActivity<br>
org.laptop.community.Finance<br>
org.laptop.community.TypingTur<wbr>tle<br>
org.laptop.sugar.Jukebox<br>
org.laptop.Words<br>
org.eq.FotoToon<br>
org.gnome.Labyrinth<br>
com.laptop.Ruler<br>
org.sugarlabs.AbacusActivity<br>
org.sugarlabs.IRC<br>
org.sugarlabs.InfoSlicer<br>
org.sugarlabs.PortfolioActivit<wbr>y<br>
org.sugarlabs.StoryActivity<br>
org.sugarlabs.VisualMatchActiv<wbr>ity<br>
com.garycmartin.Moon<br>
mulawa.Countries<br>
tv.alterna.Clock<br>
vu.lux.olpc.Maze<br>
vu.lux.olpc.Speak<br>
EOF<br>
<br>
cat > /etc/sysconfig/desktop <<EOF<br>
PREFERRED=/usr/bin/sugar<br>
DISPLAYMANAGER=/usr/sbin/light<wbr>dm<br>
EOF<br>
<br>
# set up lightdm autologin<br>
sed -i 's/^#autologin-user=.*/autolog<wbr>in-user=liveuser/' /etc/lightdm/lightdm.conf<br>
sed -i 's/^#autologin-user-timeout=.*<wbr>/autologin-user-timeout=0/' /etc/lightdm/lightdm.conf<br>
<br>
# Don't use the default system user (in SoaS liveuser) as nick name<br>
# Disable the logout menu item in Sugar<br>
# Enable Sugar power management<br>
cat >/usr/share/glib-2.0/schemas/s<wbr>ugar.soas.gschema.override <<EOF<br>
[org.sugarlabs.user]<br>
default-nick='disabled'<br>
<br>
[org.sugarlabs]<br>
show-logout=false<br>
<br>
[org.sugarlabs.power]<br>
automatic=true<br>
EOF<br>
/usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/su<wbr>gar.soas.gschema.override<br>
<br>
%end<br>
<br>
%post<br>
<br>
cat >> /etc/rc.d/init.d/livesys << EOF<br>
# set up lightdm autologin<br>
sed -i 's/^#autologin-user=.*/autolog<wbr>in-user=liveuser/' /etc/lightdm/lightdm.conf<br>
sed -i 's/^#autologin-user-timeout=.*<wbr>/autologin-user-timeout=0/' /etc/lightdm/lightdm.conf<br>
#sed -i 's/^#show-language-selector=.*<wbr>/show-language-selector=true/' /etc/lightdm/lightdm-gtk-greet<wbr>er.conf<br>
<br>
# set Sugar as default session, otherwise login will fail<br>
sed -i 's/^#user-session=.*/user-sess<wbr>ion=sugar/' /etc/lightdm/lightdm.conf<br>
EOF<br>
<br>
cat >> /etc/rc.d/init.d/livesys-late << EOF<br>
<br>
# disable screensaver locking<br>
cat >> /usr/share/glib-2.0/schemas/or<wbr><a href="http://g.gnome.desktop.screensaver.gs">g.gnome.desktop.screensaver.gs</a><wbr>chema.override << FOE<br>
[org.gnome.desktop.screensaver<wbr>]<br>
lock-enabled=false<br>
FOE<br>
<br>
# and hide the lock screen option<br>
cat >> /usr/share/glib-2.0/schemas/or<wbr>g.gnome.desktop.lockdown.gsche<wbr>ma.override << FOE<br>
[org.gnome.desktop.lockdown]<br>
disable-lock-screen=true<br>
FOE<br>
<br>
# rebuild schema cache with any overrides we installed<br>
glib-compile-schemas /usr/share/glib-2.0/schemas<br>
<br>
EOF<br>
<br>
chmod 755 /etc/rc.d/init.d/livesys-late<br>
/sbin/restorecon /etc/rc.d/init.d/livesys-late<br>
/sbin/chkconfig --add livesys-late<br>
<br>
%end<br>
<br>
%packages<br>
@anaconda-tools<br>
@base-x<br>
@core<br>
@guest-desktop-agents<br>
@hardware-support<br>
@input-methods<br>
@networkmanager-submodules<br>
@standard<br>
@sugar-desktop<br>
aajohan-comfortaa-fonts<br>
alsa-plugins-pulseaudio<br>
alsa-utils<br>
anaconda<br>
dejavu-sans-fonts<br>
dejavu-sans-mono-fonts<br>
dracut-live<br>
glibc-all-langpacks<br>
grub2-efi<br>
gstreamer-plugins-espeak<br>
gstreamer1-plugins-bad-free<br>
gstreamer1-plugins-base<br>
gstreamer1-plugins-good<br>
kernel<br>
kernel-modules<br>
kernel-modules-extra<br>
lightdm<br>
lightdm-gtk<br>
madan-fonts<br>
memtest86+<br>
pulseaudio<br>
pulseaudio-utils<br>
rp-pppoe<br>
sil-abyssinica-fonts<br>
sugar-cp-updater<br>
sugar-logos<br>
syslinux<br>
vlgothic-fonts<br>
webkitgtk3<br>
-@dial-up<br>
-@fonts<br>
-@gnome-desktop<br>
-@multimedia<br>
-@printing<br>
-PackageKit<br>
-abrt-cli<br>
-autofs<br>
-coolkey<br>
-eekboard-libs<br>
-firefox<br>
-foomatic<br>
-gfs2-utils<br>
-glx-utils<br>
-hplip<br>
-hyperv-daemons<br>
-ibus*<br>
-icedtea-web<br>
-isdn4k-utils<br>
-mpage<br>
-nmap-ncat<br>
-numactl<br>
-open-vm-tools*<br>
-openbox<br>
-plymouth-system-theme<br>
-plymouth-theme-charge<br>
-rdate<br>
-rdist<br>
-sane-backends<br>
-sane-backends-drivers-scanner<wbr>s<br>
-sox<br>
-sugar-ruler<br>
-webkitgtk4-plugin-process-gtk<wbr>2<br>
-wget<br>
-xsane<br>
-xsane-gimp<br>
-yp-tools<br>
-ypbind<br>
<br>
%end<br>
<br>
<br>
______________________________<wbr>_________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.or<wbr>g</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" rel="noreferrer" target="_blank">http://lists.sugarlabs.org/lis<wbr>tinfo/sugar-devel</a><br>
</div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><font><font>Walter Bender</font></font><br><font><font>Sugar Labs</font></font></div><div><font><a href="http://www.sugarlabs.org" target="_blank"><font>http://www.sugarlabs.org</font></a></font><br><a href="http://www.sugarlabs.org" target="_blank"><font></font></a><br></div></div></div>
</div></div>