#!/bin/sh # to be sourced (so it blocks as long as firefox runs) # (c) 2004 Mandrakesoft SA # (c) 2006,2007 Mandriva SA # this script runs a firefox instance with a specific profile # and points it at register page BROWSER=/usr/bin/display_help [ -x $BROWSER ] || BROWSER=/usr/bin/mozilla-firefox if [ -f /etc/sysconfig/firstboot -a -x $BROWSER ]; then . /etc/sysconfig/firstboot if [ "$FIRSTBOOT" = yes ]; then # run HCL collector for later upload: [ -x /usr/sbin/hclcollector ] && /usr/sbin/hclcollector& TMPUSER=ftw # after an install with main_language=english and more_languages=japanese, # uim will be launched by gtk, and uim will fail when HOME is unset # (which is the case with xdm and kdm, cf #24472) # This also fixes firefox startup: HOME2=/home/$TMPUSER /usr/sbin/useradd -r -m -s /bin/false -d $HOME2 -c "system user for drakfirsttime" $TMPUSER # copy the X11 cookie so that we can connect to the X server: cp -a $XAUTHORITY $HOME2/.Xauthority chown -R $TMPUSER $HOME2 # run the wizard as user: su ftw -m -c "USER=$TMPUSER GCONF_TMPDIR=$HOME2/tmp HOME=$HOME2 BROWSER=$BROWSER XAUTHORITY=$HOME2/.Xauthority /usr/bin/ftw-start-browser.sh" # ftw was done: echo "FIRSTBOOT=no" > /etc/sysconfig/firstboot # securize the system: userdel -r $TMPUSER fi fi