slitaz-arm rev 154
satart X a bit before and use dialog progress to update rpi kernel
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Apr 30 21:55:08 2014 +0200 (2014-04-30) |
parents | bf2c4ab32f89 |
children | 4db802251c61 |
files | rootfs/etc/init.d/rcS rootfs/etc/init.d/system.sh rpi/tazberry |
line diff
1.1 --- a/rootfs/etc/init.d/rcS Wed Apr 30 18:36:04 2014 +0100 1.2 +++ b/rootfs/etc/init.d/rcS Wed Apr 30 21:55:08 2014 +0200 1.3 @@ -78,6 +78,12 @@ 1.4 /etc/init.d/$script | tee -a ${log} 1.5 done 1.6 1.7 +# Start X session 1.8 +if [ "$LOGIN_MANAGER" ] && [ -x "/etc/init.d/$LOGIN_MANAGER" ]; then 1.9 + colorize 36 "Starting X environment..." 1.10 + /etc/init.d/$LOGIN_MANAGER start >/dev/null & 1.11 +fi 1.12 + 1.13 # Start all daemons 1.14 if [ "$RUN_DAEMONS" ]; then 1.15 colorize 33 "Starting all daemons..." 1.16 @@ -86,14 +92,6 @@ 1.17 done 1.18 fi 1.19 1.20 -# Start X session 1.21 -if [ "$LOGIN_MANAGER" ] && [ -x "/etc/init.d/$LOGIN_MANAGER" ]; then 1.22 - #mkdir -p /var/run/dbus 1.23 - #/etc/init.d/dbus start 1.24 - colorize 36 "Starting X environment..." 1.25 - /etc/init.d/$LOGIN_MANAGER start >/dev/null & 1.26 -fi 1.27 - 1.28 newline 1.29 colorize 32 "$MESSAGE" 1.30
2.1 --- a/rootfs/etc/init.d/system.sh Wed Apr 30 18:36:04 2014 +0100 2.2 +++ b/rootfs/etc/init.d/system.sh Wed Apr 30 21:55:08 2014 +0200 2.3 @@ -43,9 +43,8 @@ 2.4 ntpd -q -p ${$NTPD_HOST}; status 2.5 fi 2.6 2.7 -# DEPRECATED: Xorg dont need any config file anymore but the 60-Keyboard.conf 2.8 -# Xorg configuration: $HOME is not yet set 2.9 +# We need Xorg 40-Keyboard.conf and SliTaz applications.conf 2.10 if [ ! -s "/etc/X11/xorg.conf" ] && [ -x "/usr/bin/Xorg" ]; then 2.11 - echo "Configuring Xorg server..." && HOME="/root" 2.12 - tazx config-xorg 2>/var/log/xorg.configure.log 2.13 + echo "Configuring Xorg server..." && 2.14 + HOME="/root" tazx init 2.15 fi
3.1 --- a/rpi/tazberry Wed Apr 30 18:36:04 2014 +0100 3.2 +++ b/rpi/tazberry Wed Apr 30 21:55:08 2014 +0200 3.3 @@ -80,49 +80,60 @@ 3.4 } 3.5 3.6 # Update custom Raspberry Pi Kernel 3.7 -rpi_linux_up() { 3.8 +linux_update() { 3.9 cache="/var/cache/tazpkg" 3.10 current="/var/lib/tazpkg/installed/linux" 3.11 - newline 3.12 - colorize 35 "$(gettext 'Raspberry Pi kernel update')" 3.13 - separator 3.14 - mkdir -p ${cache} 3.15 + { 3.16 + echo "XXX" && echo 20 3.17 + echo -e "\n$(gettext 'Raspberry Pi kernel update')" 3.18 + echo "XXX" && sleep 1 3.19 + mkdir -p ${cache} 3.20 + rm -f ${cache}/linux-version.txt 3.21 3.22 - # Last version 3.23 - rm -f ${cache}/linux-version.txt 3.24 - if busybox wget -q -s ${rpi_mirror}/packages/last-linux.txt; then 3.25 - echo -n "Fetching latest Kernel string..." 3.26 - wget -q ${rpi_mirror}/packages/last-linux.txt \ 3.27 - -O ${cache}/linux-version.txt || exit 1 3.28 - status 3.29 - else 3.30 - gettext "Mirror is unreachable"; echo && exit 1 3.31 - fi 3.32 - kvers=$(cat $cache/linux-version.txt) 3.33 - rm -rf ${cache}/linux-${kvers}* 3.34 - gettext "Last Kernel version: $kvers"; echo 3.35 - 3.36 - # Current version 3.37 - if [ -f "$current/receipt" ]; then 3.38 - . ${current}/receipt 3.39 - [ "$VERSION" != "$kvers" ] && echo "Current version: $VERSION" 3.40 - fi 3.41 - 3.42 - # Download 3.43 - gettext "Fetching latest Linux package..." 3.44 - wget -q ${rpi_mirror}/packages/linux-${kvers}.tazpkg \ 3.45 - -O ${cache}/linux-${kvers}.tazpkg; status 3.46 - 3.47 - # Install 3.48 - if [ -f "$cache/linux-$kvers.tazpkg" ]; then 3.49 - cd ${cache} && spk-add linux-${kvers}.tazpkg --forced 3.50 - else 3.51 - gettext "Kernel update failed..."; false 3.52 - status 3.53 - fi 3.54 - 3.55 - rm -f ${cache}/linux-version.txt 3.56 - separator && newline 3.57 + # Last version 3.58 + echo "XXX" && echo 40 3.59 + echo -e "\n$(gettext 'Fetching latest Kernel version string...')" 3.60 + echo "XXX" && sleep 1 3.61 + if busybox wget -q -s ${rpi_mirror}/packages/last-linux.txt; then 3.62 + wget -q ${rpi_mirror}/packages/last-linux.txt \ 3.63 + -O ${cache}/linux-version.txt || exit 1 3.64 + else 3.65 + echo "XXX" && echo 100 3.66 + echo -e "\n$(gettext 'Mirror is unreachable')" 3.67 + echo "XXX" && sleep 1 3.68 + exit 1 3.69 + fi 3.70 + kvers=$(cat $cache/linux-version.txt) 3.71 + 3.72 + echo "XXX" && echo 50 3.73 + echo -e "\n$(gettext 'Last Kernel version:') $kvers" 3.74 + echo "XXX" && sleep 2 3.75 + rm -rf ${cache}/linux-${kvers}* 3.76 + 3.77 + # Download 3.78 + echo "XXX" && echo 60 3.79 + echo -e "\n$(gettext 'Fetching latest Linux package...')" 3.80 + echo "XXX" 3.81 + wget -q ${rpi_mirror}/packages/linux-${kvers}.tazpkg \ 3.82 + -O ${cache}/linux-${kvers}.tazpkg || exit 1 3.83 + 3.84 + # Install 3.85 + echo "XXX" && echo 80 3.86 + echo -e "\n$(gettext 'Installing:') linux-${kvers}.tazpkg" 3.87 + echo "XXX" 3.88 + cd ${cache} 3.89 + spk-add linux-${kvers}.tazpkg --forced >/dev/null 2>&1 || exit 1 3.90 + 3.91 + echo "XXX" && echo 100 3.92 + echo -e "\n$(gettext 'cleaning installing files...')" 3.93 + echo "XXX" && sleep 2 3.94 + rm -f ${cache}/linux-version.txt 3.95 + 3.96 + } | dialog --title "{ Kernel Update }" \ 3.97 + --gauge "" 8 ${width} 0 3.98 + # Reboot ? 3.99 + reboot_ox \ 3.100 + "$(gettext 'You must reboot to use your new Linux Kernel.')" 3.101 } 3.102 3.103 # Unset overclocking 3.104 @@ -219,6 +230,14 @@ 3.105 --tailbox "$1" ${height} ${width} 3.106 } 3.107 3.108 +# Usage: reboot_box "Message..." 3.109 +reboot_box() { 3.110 + dialog --title "$title" --yesno "\n${2}\n\n 3.111 +Do You wish to reboot now ?" \ 3.112 + ${height} ${width} 3.113 + [ "$?" == 0 ] && reboot 3.114 +} 3.115 + 3.116 # Packages info and spk-up button 3.117 pkgs_box() { 3.118 out="$tmpdir/spk-info.txt" 3.119 @@ -335,13 +354,8 @@ 3.120 --gauge "" 8 ${width} 0 3.121 3.122 # Reboot ? 3.123 - dialog --title "$title" \ 3.124 - --yesno "\n\ 3.125 -SliTaz is configured for the PiCam but you need a reboot to use it.\ 3.126 -\n\n 3.127 -Do You wish to reboot now ?" \ 3.128 - ${height} ${width} 3.129 - [ "$?" == 0 ] && reboot 3.130 + reboot_ox \ 3.131 + "$(gettext 'SliTaz is configured for the PiCam but you need a reboot to use it.')" 3.132 } 3.133 3.134 # Breakout bords!