# HG changeset patch # User Christophe Lincoln # Date 1240759131 -7200 # Node ID 6d0cd1b906c6c0691361048c3e71006be5d389a4 # Parent d7d2f465d02aab528ddc2cd98c83be52018bb4b0 Default user may exist have a uid 1001, 1002, etc. diff -r d7d2f465d02a -r 6d0cd1b906c6 etc/init.d/bootopts.sh --- a/etc/init.d/bootopts.sh Sun Apr 26 17:12:27 2009 +0200 +++ b/etc/init.d/bootopts.sh Sun Apr 26 17:18:51 2009 +0200 @@ -17,7 +17,7 @@ # user=name can be used, but user must be add before home= to have home dir. # This option is not handled by a loop and case like other and without # effect on a installed system. -if ! grep -q "1000:1000" /etc/passwd; then +if ! grep -q "100[0-9]:100[0-9]" /etc/passwd; then if grep -q "user=" /proc/cmdline; then USER=`cat /proc/cmdline | sed 's/.*user=\([^ ]*\).*/\1/'` # Avoid usage of an existing system user or root. @@ -123,6 +123,15 @@ chown -R $USER.$USER /home/$USER else rm -rf /tmp/$USER-files + fi + # Install all packages in /home/boot/packages. In live (CD and USB) mode + # the option home= mount the device on /home, so we already have a boot + # directory with the Kernel and rootfs. + if [ -d "/home/boot/packages" ]; then + for pkg in /home/boot/packages/*.tazpkg + do + tazpkg install $pkg + done fi ;; laptop) # Laptop option to load ac and battery Kernel modules. @@ -193,13 +202,3 @@ echo "Activating swap memory..." swapon -a fi - -# Install all packages in /home/boot/packages. In live (CD and USB) mode -# the option home= will mount the device on /home, so we already have -# a boot directory with the Kernel and rootfs. -if [ -d "/home/boot/packages" ]; then - for pkg in /home/boot/packages/*.tazpkg - do - tazpkg install $pkg - done -fi