wok rev 18250

Up tazpanel (516)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Aug 02 20:30:04 2015 +0200 (2015-08-02)
parents 629dd2a26150
children e4f1abb1d463
files lxde/receipt tazpanel-extra/receipt tazpanel-extra/stuff/bootloader tazpanel-extra/stuff/floppy.cgi tazpanel-extra/stuff/powersaving.cgi tazpanel/receipt
line diff
     1.1 --- a/lxde/receipt	Sun Aug 02 15:15:17 2015 +0200
     1.2 +++ b/lxde/receipt	Sun Aug 02 20:30:04 2015 +0200
     1.3 @@ -12,7 +12,7 @@
     1.4  
     1.5  SUGGESTED="lxterminal lxdm lxshortcut xarchiver"
     1.6  DEPENDS="xorg-libX11 gtk+ lxpanel lxtask lxappearance lxsession pcmanfm \
     1.7 -lxsession-edit lxrandr lxinput openbox obconf gpicview leafpad slitaz-configs
     1.8 +lxsession-edit lxrandr lxinput openbox obconf gpicview leafpad slitaz-configs \
     1.9  slitaz-tools-boxes"
    1.10  
    1.11  # Rules to gen a SliTaz package suitable for Tazpkg.
     2.1 --- a/tazpanel-extra/receipt	Sun Aug 02 15:15:17 2015 +0200
     2.2 +++ b/tazpanel-extra/receipt	Sun Aug 02 20:30:04 2015 +0200
     2.3 @@ -1,7 +1,7 @@
     2.4  # SliTaz package receipt.
     2.5  
     2.6  PACKAGE="tazpanel-extra"
     2.7 -VERSION="1.0"
     2.8 +VERSION="516"
     2.9  CATEGORY="system-tools"
    2.10  SHORT_DESC="SliTaz administration and configuration panel extra modules."
    2.11  MAINTAINER="pascal.bellard@slitaz.org"
    2.12 @@ -11,14 +11,14 @@
    2.13  
    2.14  DEPENDS="tazpanel"
    2.15  
    2.16 +# Rules to configure and make the package.
    2.17 +compile_rules()
    2.18 +{
    2.19 +	make DESTDIR=$DESTDIR VERSION=$VERSION install-extra
    2.20 +}
    2.21 +
    2.22  # Rules to gen a SliTaz package suitable for Tazpkg.
    2.23  genpkg_rules()
    2.24  {
    2.25 -	mkdir -p $fs/var/www/tazpanel/menu.d/boot $fs/usr/bin \
    2.26 -		 $fs/var/www/tazpanel/menu.d/hardware
    2.27 -	cp -a $stuff/bootloader $fs/usr/bin/
    2.28 -	cp -a $stuff/floppy.cgi $fs/var/www/tazpanel/
    2.29 -	ln -s ../../floppy.cgi $fs/var/www/tazpanel/menu.d/boot/floppy
    2.30 -	cp -a $stuff/powersaving.cgi $fs/var/www/tazpanel/
    2.31 -	ln -s ../../powersaving.cgi $fs/var/www/tazpanel/menu.d/hardware/powersaving
    2.32 +	cp -a $install/* $fs
    2.33  }
     3.1 --- a/tazpanel-extra/stuff/bootloader	Sun Aug 02 15:15:17 2015 +0200
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,396 +0,0 @@
     3.4 -#!/bin/sh
     3.5 -#
     3.6 -# This script creates a floppy image set from a linux bzImage and can merge
     3.7 -# a cmdline and/or one or more initramfs.
     3.8 -#
     3.9 -# (C) 2009-2015 Pascal Bellard - GNU General Public License v3.
    3.10 -
    3.11 -usage()
    3.12 -{
    3.13 -cat <<EOT
    3.14 -Usage: $0 bzImage [--prefix image_prefix] [--info file] [--quiet]
    3.15 -       [--format 1200|1440|1680|1920|2880|...] [--mem mb] [--tracks cnt]
    3.16 -       [--rdev device] [--video mode] [--flags rootflags] [--no-syssize-fix]
    3.17 -       [--dont-edit-cmdline] [--cmdline 'args'] [--hide-version-string]
    3.18 -       [--address-initrd address] [--initrd initrdfile]...
    3.19 -
    3.20 -Default values: --format 1440 --tracks 80 --rdev /dev/fd0 --prefix floppy. --mem 16
    3.21 -
    3.22 -Example:
    3.23 -$0 /boot/bzImage --rdev /dev/ram0 --video -3 --cmdline 'rw lang=fr_FR kmap=fr-latin1 laptop autologin' --initrd /boot/rootfs.gz --initrd ./myconfig.gz
    3.24 -
    3.25 -or: $0 --extract floppy*
    3.26 -
    3.27 -Create kernel and maybe cmdline, initrd and info files from a floppy images set 
    3.28 -EOT
    3.29 -exit 1
    3.30 -}
    3.31 -
    3.32 -# bzImage offsets
    3.33 -SetupSzOfs=497
    3.34 -FlagsOfs=498
    3.35 -OldRamfsLenOfs=504
    3.36 -VideoModeOfs=506
    3.37 -RootDevOfs=508
    3.38 -Magic=0x202
    3.39 -RamfsAdrOfs=0x218
    3.40 -RamfsLenOfs=0x21C
    3.41 -
    3.42 -ddq() { dd $@ 2> /dev/null; }
    3.43 -
    3.44 -get()
    3.45 -{
    3.46 -echo $( od -v -j $(($1)) -N ${4:-${3:-2}} -t u${3:-2} -w${3:-2} -An $2 2>/dev/null ||
    3.47 -	hexdump -v -s $(($1)) -n ${4:-${3:-2}} -e "\"\" 1/${3:-2} \" %d\n\"" $2 )
    3.48 -}
    3.49 -
    3.50 -trace()
    3.51 -{
    3.52 -	[ -n "$DEBUG" ] && printf "$@" 1>&2 && echo 1>&2
    3.53 -}
    3.54 -
    3.55 -# usage: store bits offset data file
    3.56 -store()
    3.57 -{
    3.58 -	n=$3; for i in $(seq 8 8 $1); do
    3.59 -		printf '\\\\x%02X' $(($n & 255))
    3.60 -		n=$(($n >> 8))
    3.61 -	done | xargs echo -en | ddq bs=1 conv=notrunc of=$4 seek=$(($2))
    3.62 -	s=$1; a=$2; d=$3; shift 4; c="$@"
    3.63 -	trace "store$s(%03X) = %0$(($s/4))X	$c" $a $d
    3.64 -}
    3.65 -
    3.66 -die()
    3.67 -{
    3.68 -	echo $@ 1>&2
    3.69 -	exit 1
    3.70 -}
    3.71 -extract()
    3.72 -{
    3.73 -	shift
    3.74 -	[ ! -s "$1" ] && die "No floppy ?"
    3.75 -	[ $(get 0x1FE "$1") -ne 43605 ] && die "Not bootable"
    3.76 -	[ $(get $Magic "$1" 4) != 1400005704 ] &&
    3.77 -	[ $(get 0x1F4 "$1") -gt 32768 -o $(get 0x1F6 "$1") -ne 0 ] &&
    3.78 -	die "Not linux."
    3.79 -	FORMAT="$(($(stat -c "%s" $1)/1024))"
    3.80 -	cat <<EOT
    3.81 ---format $FORMAT
    3.82 ---rdev $(printf "0x%04X" $(get $RootDevOfs $1))
    3.83 ---video $(get $VideoModeOfs $1)
    3.84 ---flags $(get $FlagsOfs $1)
    3.85 -EOT
    3.86 -	MYBB="$(ddq if=$1 bs=512 count=1 | strings | grep "Insert disk 00")"
    3.87 -	cmdline=0
    3.88 -	info=0
    3.89 -	if [ "$MYBB" ]; then
    3.90 -		cmdline=$(get 0x22 $1)
    3.91 -		info=$(get 0x1EF $1)
    3.92 -		[ $(get 0x75 $1) -eq $((0xDB0)) ] && echo "--dont-edit-cmdline"
    3.93 -		[ $(get 0x58 $1) -eq $((0x9090)) ] && echo "--hide-version-string"
    3.94 -	fi
    3.95 -	n=$(($(get $SetupSzOfs $1 1)+1))
    3.96 -	[ $n -eq 1 ] && n=5
    3.97 -	[ $info -ne 0 ] && infolen=$(($n-$info/512)) && n=$(($info/512))
    3.98 -	[ $cmdline -ne 0 ] && n=$(($cmdline/512))
    3.99 -	cat "$@" | {
   3.100 -		ddq bs=512 count=$n >kernel
   3.101 -		files="kernel"
   3.102 -		if [ "$MYBB" ]; then
   3.103 -			store 8 $SetupSzOfs $(($n-1)) kernel "setup size $n"
   3.104 -			store 16 0x22 0 kernel "clear cmdline"
   3.105 -			store 16 0x1EF 0 kernel "clear info"
   3.106 -		fi
   3.107 -		[ $cmdline -ne 0 ] && files="$files cmdline" &&
   3.108 -		ddq bs=512 count=1 | strings | sed q > cmdline
   3.109 -		[ $info -ne 0 ] && files="$files info" &&
   3.110 -		ddq bs=512 count=$infolen | sed \
   3.111 -		 's/'$(echo -en "\xff\xff$//;s/\xff/\f")'/g;s/\r/\n/g;q' > info
   3.112 -		syssz=$(get 0x1F4 kernel 4)
   3.113 -		ddq bs=16 count=$syssz >>kernel
   3.114 -		[ $(($syssz % 32)) -ne 0 ] &&
   3.115 -		ddq bs=16 of=/dev/null count=$((32 - ($syssz % 32)))
   3.116 -		if [ $(get $Magic kernel 4) == 1400005704 ]; then
   3.117 -	  		ddq bs=1 count=200 skip=$((512+$(get 0x20E kernel 2))) \
   3.118 -	  			if=kernel | strings | sed q
   3.119 -			len=$(get $RamfsLenOfs kernel 4)
   3.120 -			if [ $len -ne 0 ]; then
   3.121 -				adrs=$(get $RamfsAdrOfs kernel 4)
   3.122 -				printf "--address-initrd 0x%X \n" $adrs
   3.123 -				echo "--mem $(((($adrs+$len)/1024+512)/1024))"
   3.124 -				ddq bs=512 count=$((($len+511)/512)) > initrd
   3.125 -				ddq count=0 bs=1 seek=$len of=initrd
   3.126 -				files="$files initrd"
   3.127 -				store 64 $RamfsAdrOfs 0 kernel "reset initrd"
   3.128 -			fi
   3.129 -			if [ $(get 0x206 kernel) -ge 514 ]; then
   3.130 -				store 32 0x228 0 kernel "clean cmdline32"
   3.131 -			fi
   3.132 -		else
   3.133 -			len=$(get $OldRamfsLenOfs kernel)
   3.134 -			[ $len -ne 0 ] && files="$files initrd" &&
   3.135 -			if [ -s "$2" ]; then
   3.136 -				ddq if=$2 bs=1024 count=$len of=initrd
   3.137 -			else
   3.138 -				ddq if=$1 bs=1024 skip=256 count=$len of=initrd
   3.139 -			fi
   3.140 -		fi
   3.141 -		ls -l $files
   3.142 -	}
   3.143 -	exit
   3.144 -}
   3.145 -
   3.146 -KERNEL=""
   3.147 -INITRD=""
   3.148 -ADRSRD=""
   3.149 -CMDLINE=""
   3.150 -PREFIX="floppy."
   3.151 -FORMAT="1440"
   3.152 -RDEV=""
   3.153 -VIDEO=""
   3.154 -FLAGS=""
   3.155 -TRACKS="80"
   3.156 -MEM="16"
   3.157 -HIDE=""
   3.158 -NOEDIT=""
   3.159 -QUIET=""
   3.160 -NOSYSSIZEFIX=""
   3.161 -INFOFILE=""
   3.162 -DEBUG=""
   3.163 -while [ -n "$1" ]; do
   3.164 -	case "${1/--/-}" in
   3.165 -	-c*) CMDLINE="$2"; shift;;
   3.166 -	-inf*) INFOFILE="$2"; shift;;
   3.167 -	-i*) INITRD="$INITRD $2"; shift;;
   3.168 -	-a*) ADRSRD="$2"; shift;;
   3.169 -	-h*) HIDE="1";;
   3.170 -	-p*) PREFIX="$2"; shift;;
   3.171 -	-fl*)FLAGS="$2"; shift;;	# 1 read-only, 0 read-write
   3.172 -	-f*) FORMAT="$2"; shift;;
   3.173 -	-m*) MEM="$(echo $2 | sed 's/[^0-9]//g')"; shift;;
   3.174 -	-r*) RDEV="$2"; shift;;
   3.175 -	-v*) VIDEO="$2"; shift;;	# -3 .. n
   3.176 -	-t*) TRACKS="$2"; shift;;	# likely 81 .. 84
   3.177 -	-n*) NOSYSSIZEFIX="1";;
   3.178 -	-debug) DEBUG="1";;
   3.179 -	-d*) NOEDIT="1";;
   3.180 -	-q*) QUIET="1";;
   3.181 -	-e*) extract "$@";;
   3.182 -	*) KERNEL="$1";;
   3.183 -	esac
   3.184 -	shift
   3.185 -done
   3.186 -[ -n "$KERNEL" -a -f "$KERNEL" ] || usage
   3.187 -while [ -L "$KERNEL" ]; do KERNEL="$(readlink "$KERNEL")"; done
   3.188 -if [ $(( $FORMAT % $TRACKS )) -ne 0 ]; then
   3.189 -	echo "Invalid track count for format $FORMAT."
   3.190 -	usage
   3.191 -fi
   3.192 -[ 0$MEM -lt 2  ] && MEM=2
   3.193 -
   3.194 -patch()
   3.195 -{
   3.196 -	echo -en $(echo ":$2" | sed 's/:/\\x/g') | \
   3.197 -		ddq bs=1 conv=notrunc of=$3 seek=$((0x$1))
   3.198 -	trace "patch $1 $2		$4"
   3.199 -}
   3.200 -
   3.201 -error()
   3.202 -{
   3.203 -	rm -f $bs
   3.204 -	die $@
   3.205 -}
   3.206 -
   3.207 -floppyset()
   3.208 -{
   3.209 -	# boot+setup address
   3.210 -	SetupBase=0x90000
   3.211 -
   3.212 -	bs=/tmp/bs$$
   3.213 -
   3.214 -	# Get and patch boot sector
   3.215 -	# See http://hg.slitaz.org/wok/raw-file/13835bce7189/syslinux/stuff/iso2exe/bootloader.S
   3.216 -	trace "Read bootsector..."
   3.217 -	ddq if=$KERNEL bs=512 count=1 of=$bs
   3.218 -
   3.219 -	[ $(get 0x1FE $bs) -eq 43605 ] || error "Not bootable"
   3.220 -	
   3.221 -	uudecode <<EOT | ddq of=$bs conv=notrunc
   3.222 -begin-base64 644 -
   3.223 -v8adaACQF4n8FgcxwLk7APOqWx+g8X1AD6H6xXd4XwZXvQAAsQbzpRYfZGaP
   3.224 -R3jGRfg/l1hB6CQBMfYLNu8BdAzoggF0B+hgATwbdfS+AAKBTBAggMZEJZvo
   3.225 -ZwEx9gt3G3Q6x0cZP6PoWwGwIOgtASwYc/lO6DEBmDwIdAOIBK05dxt08OgV
   3.226 -ATwKdd+IfP4WB78AgIn+h3cbtQLzpFuJ5v9IEMdAFAiTgPMIdfO79AGxBaEV
   3.227 -AmaLH2ZLZtPrZkOJRBtmv4AAAABmKfuccwIB31BTVjHbaACAB+hwAF5bjMG0
   3.228 -hxYHzRVYBQABEEwfnXfPuQkCuxwCOE/+che0iM0VPQCwcgaIbB+Ib/+hGQLT
   3.229 -b+J1o5fNE+oAACCQWjjBdzRgzRP56HMAYVJQKMh3ArABOfhyAon4ULQCzRNa
   3.230 -WHLclQHRjukA1wDXKddadE2M6ZU4wXXUiMixATDOdcz+xYD9UHXFtQBgvtEB
   3.231 -U7sPAIAg8Ev+AIA4OXf16EwAW4n16CkAdRVSmM0TuAECzRNa0NQ6Zv516kVI
   3.232 -debrjbAxHAO0DrsHAM0QPA1088O/bARkxgWmuA0BZDoldArNFnT0mM0WjudH
   3.233 -wwN0DrAN6NL/rDwAf/jDSW5zZXJ0IGRpc2sgMDAxIGFuZCBFbnRlci4HDQAA
   3.234 -AAA=
   3.235 -====
   3.236 -EOT
   3.237 -	# Get setup
   3.238 -	setupsz=$(get $SetupSzOfs $bs 1)
   3.239 -	if [ $setupsz -eq 0 ]; then
   3.240 -		setupsz=4
   3.241 -		store 8 $SetupSzOfs $setupsz $bs "setup size $setupsz"
   3.242 -	fi
   3.243 -	trace "Read setup ($setupsz sectors) ..."
   3.244 -	ddq if=$KERNEL bs=512 skip=1 count=$setupsz >> $bs
   3.245 -
   3.246 -	Version=$(get 0x206 $bs)
   3.247 -	[ $(get $Magic $bs 4) != 1400005704 ] && Version=0
   3.248 -	feature=""
   3.249 -	while read prot kern info ; do
   3.250 -		[ $Version -lt $((0x$prot)) ] && continue
   3.251 -		feature="features $prot starting from kernel $kern "
   3.252 -	done <<EOT
   3.253 -200	1.3.73	kernel_version, bzImage, initrd, loadflags/type_of_loader
   3.254 -201	1.3.76	heap_end_ptr
   3.255 -202	2.4.0	new cmdline + relocatable setup
   3.256 -204	2.6.14	long syssize
   3.257 -206	2.6.22	cmdline maxsize $(get 0x238 $bs 4)
   3.258 -EOT
   3.259 -	trace "Protocol %X $feature" $Version
   3.260 -	
   3.261 -	# Old kernels need bootsector patches to disable rescent features
   3.262 -	while read minversion maxversion offset bytes rem; do
   3.263 -		[ $Version -gt $(( 0x$maxversion )) ] && continue
   3.264 -		[ $Version -lt $(( 0x$minversion )) ] && continue
   3.265 -		patch $offset $bytes $bs "$rem"
   3.266 -	done <<EOT
   3.267 -000 1FF 0B2	B8:00:01			force zImage (movw \$0x100, %ax)
   3.268 -000 1FF 0F9	EB				skip initrd code 
   3.269 -000 1FF 059	90:90:90			no kernel version
   3.270 -000 1FF 050	90:90:90:90:90			type_of_loader
   3.271 -000 200 055	90:90:90:90			heap_end_ptr
   3.272 -000 203 1F6	00:00 				syssize32
   3.273 -EOT
   3.274 -	[ -n "$CMDLINE" ] || patch 061 EB $bs "No cmdline"
   3.275 -	[ -n "$HIDE" ] && patch 058 90 90 90 $bs "Hide version"
   3.276 -	[ -n "$NOEDIT" ] && patch 075 B0:0D:90 $bs 'mov CR,%al ; nop'
   3.277 -	[ 1$TRACKS -ne 180 ] &&	store	8	0x15F		$TRACKS $bs TRACKS
   3.278 -	
   3.279 -	[ -n "$FLAGS" ] &&	store	16	$FlagsOfs	$FLAGS $bs FLAGS
   3.280 -	[ -n "$VIDEO" ] &&	store	16	$VideoModeOfs	$VIDEO $bs VIDEO
   3.281 -	[ -n "$RDEV" ] || case "$FORMAT" in
   3.282 -		1200)	RDEV=0x0208 ;;
   3.283 -		1440)	RDEV=0x021C ;;
   3.284 -		2880)	RDEV=0x0220 ;;
   3.285 -		*)	RDEV=0x0200 ;;
   3.286 -	esac
   3.287 -	while [ -L "$RDEV" ]; do RDEV="$(readlink "$RDEV")"; done
   3.288 -	[ -b "$RDEV" ] && RDEV=$(stat -c '0x%02t%02T' $RDEV 2> /dev/null)
   3.289 -	[ "$(echo $RDEV | tr '[0-9A-FXa-fx]' 0 | sed 's/0//g')" ] ||
   3.290 -	store 16 $RootDevOfs $RDEV $bs RDEV
   3.291 -
   3.292 -	[ $FORMAT -lt 720  ] && store 8 0x15F 40	 $bs	360K
   3.293 -	[ $FORMAT -lt 320  ] && store 8 0x158 237	 $bs	160K
   3.294 -	
   3.295 -	extra=0
   3.296 -	# Store cmdline after setup for kernels >= 0.99
   3.297 -	if [ -n "$CMDLINE" ]; then
   3.298 -		CmdlineOfs=$(stat -c '%s' $bs)
   3.299 -		store 16 0x22 $CmdlineOfs $bs "Cmdline @$CmdlineOfs '$CMDLINE'"
   3.300 -		[ $Version -ge 514 ] &&
   3.301 -		store 32 0x228 $(( $SetupBase + 0x8000 )) $bs "Cmdline32"
   3.302 -		echo -n "$CMDLINE" | ddq bs=512 count=1 conv=sync >> $bs
   3.303 -		extra=$(($extra+1))
   3.304 -		store 8 0x1F1  $(($setupsz+$extra))	 $bs	setup size
   3.305 -		[ $Version -ge 512 ] && [ -n "$QUIET" ] &&
   3.306 -		store 8 0x211 $(($(get 0x211 $bs 1) | 32)) $bs suppress early messages
   3.307 -	fi
   3.308 -
   3.309 -	# Info text after setup
   3.310 -	if [ -s "$INFOFILE" ]; then
   3.311 -		InfoOfs=$(stat -c '%s' $bs)
   3.312 -		sed -e ':a;N;$!ba;s/\r\n/\r/g;s/\n/\r/g' \
   3.313 -		    -e 's/'$(echo -e "\f/\xff/g;s/$/\xff\xff")'/' \
   3.314 -			< "$INFOFILE" > $bs.infotext
   3.315 -		ddq if=/dev/zero bs=512 count=1 >>$bs.infotext
   3.316 -		infolen=$(($(stat -c %s $bs.infotext)/512))
   3.317 -		ddq if=$bs.infotext count=$infolen bs=512 >> $bs
   3.318 -		extra=$(($extra+$infolen))
   3.319 -		rm -f $bs.infotext
   3.320 -		store 8 0x1F1  $(($setupsz+$extra))	$bs	setup size
   3.321 -		store 16 0x1EF  $InfoOfs $bs	update infoptr
   3.322 -	fi
   3.323 -
   3.324 -	syssz=$((($(stat -c %s $KERNEL)+15)/16-32*(1+$setupsz)))
   3.325 -	#syssz=$(get 0x1F4 $bs 4)
   3.326 -	sysszsect=$((($syssz+31)/32))
   3.327 -	store 16 $OldRamfsLenOfs 0 $bs clear oldramfs
   3.328 -	INITRD="${INITRD# }"
   3.329 -	INITRDPAD=4
   3.330 -	[ -n "$INITRD" ] &&
   3.331 -	if [ $Version -lt 512 ]; then
   3.332 -		# Compute initramfs location (protocol < 2.00)
   3.333 -		[ $syssz -gt 32768 ] && syssz=$(get 0x1F4 $bs 2)
   3.334 -		[ $syssz -eq 0 ] && syssz=$((0x7F00))
   3.335 -		sysszsect=$((($syssz+31)/32))
   3.336 -		INITRD="${INITRD%%,*}"
   3.337 -		initrdlen=$(stat -c %s "$INITRD")
   3.338 -		store 16 $OldRamfsLenOfs $(($initrdlen/1024)) $bs set oldramfs
   3.339 -		INITRDDISKALIGN=$((0x40000))
   3.340 -		[ $(($initrdlen+$INITRDDISKALIGN)) -gt $(($FORMAT*1024)) -o \
   3.341 -		  $(((512*$sysszsect) + $(stat -c %s $bs))) -gt $INITRDDISKALIGN -o \
   3.342 -		  -n "$ADRSRD" ] && INITRDDISKALIGN=$(($FORMAT*1024))
   3.343 -	else
   3.344 -INITRDRAMALIGN=0x1000
   3.345 -		# Compute initramfs size (protocol >= 2.00)
   3.346 -		initrdlen=0
   3.347 -		INITRDDISKALIGN=0
   3.348 -		for i in ${INITRD//,/ }; do
   3.349 -			[ -s "$i" ] || continue
   3.350 -			while [ -L "$i" ]; do i="$(readlink $i)"; done
   3.351 -			size=$(stat -c %s "$i")
   3.352 -			trace "initrd $i $size "
   3.353 -			initrdlen=$(((($initrdlen + $INITRDPAD - 1) & -$INITRDPAD) + $size))
   3.354 -			ADRSRD2=$(( (($MEM * 0x100000) - $initrdlen) & -$INITRDRAMALIGN ))
   3.355 -			store 32 $RamfsAdrOfs $(( ${ADRSRD:-$ADRSRD2} )) $bs initrd adrs
   3.356 -			store 32 $RamfsLenOfs $initrdlen $bs initrdlen
   3.357 -		done
   3.358 -	fi
   3.359 -
   3.360 -	[ -n "$NOSYSSIZEFIX" ] || store 32 0x1F4 $syssz $bs fix system size
   3.361 -
   3.362 -	# Output boot sector + setup + cmdline + info
   3.363 -	ddq if=$bs
   3.364 -
   3.365 -	# Output kernel code
   3.366 -	[ $INITRDDISKALIGN -ne 0 ] &&
   3.367 -	INITRDDISKALIGN=$(($INITRDDISKALIGN/512-$sysszsect-$extra-$setupsz-1))
   3.368 -	cat $KERNEL /dev/zero | ddq bs=512 skip=$(( $setupsz+1 )) \
   3.369 -		count=$(($sysszsect+$INITRDDISKALIGN)) conv=sync
   3.370 -
   3.371 -	# Output initramfs
   3.372 -	padding=$INITRDPAD
   3.373 -	for i in ${INITRD//,/ }; do
   3.374 -		[ -s "$i" ] || continue
   3.375 -		[ $padding -eq $INITRDPAD ] || ddq if=/dev/zero bs=1 count=$padding
   3.376 -		ddq if=$i
   3.377 -		trace "initrd $i ($(stat -c %s $i) bytes) padding $INITRDPAD"
   3.378 -		padding=$(( $INITRDPAD - ($(stat -c %s $i) % $INITRDPAD) ))
   3.379 -	done
   3.380 -
   3.381 -	# Cleanup
   3.382 -	rm -f $bs
   3.383 -}
   3.384 -
   3.385 -if [ "$FORMAT" == "0" ]; then # unsplitted
   3.386 -	floppyset > $PREFIX
   3.387 -	PAD=$(( 512 - ($(stat -c %s $PREFIX) % 512) ))
   3.388 -	[ $PAD -ne 512 ] && ddq if=/dev/zero bs=1 count=$PAD >> $PREFIX
   3.389 -	exit
   3.390 -fi
   3.391 -floppyset | split -b ${FORMAT}k /dev/stdin floppy$$
   3.392 -i=1
   3.393 -ls floppy$$* 2> /dev/null | while read file ; do
   3.394 -	output=$PREFIX$(printf "%03d" $i)
   3.395 -	cat $file /dev/zero | ddq bs=1k count=$FORMAT conv=sync of=$output
   3.396 -	echo $output
   3.397 -	rm -f $file
   3.398 -	i=$(( $i + 1 ))
   3.399 -done
     4.1 --- a/tazpanel-extra/stuff/floppy.cgi	Sun Aug 02 15:15:17 2015 +0200
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,345 +0,0 @@
     4.4 -#!/bin/sh
     4.5 -#
     4.6 -# Floppy set CGI interface
     4.7 -#
     4.8 -# Copyright (C) 2015 SliTaz GNU/Linux - BSD License
     4.9 -#
    4.10 -
    4.11 -# Common functions from libtazpanel
    4.12 -. lib/libtazpanel
    4.13 -get_config
    4.14 -
    4.15 -
    4.16 -case "$1" in
    4.17 -	menu)
    4.18 -		TEXTDOMAIN_original=$TEXTDOMAIN
    4.19 -		export TEXTDOMAIN='floppy'
    4.20 -
    4.21 -		#which bootloader > /dev/null &&
    4.22 -		cat <<EOT
    4.23 -<li><a data-icon="slitaz" href="floppy.cgi">$(_ 'Boot floppy')</a></li>
    4.24 -EOT
    4.25 -		export TEXTDOMAIN=$TEXTDOMAIN_original
    4.26 -		exit
    4.27 -esac
    4.28 -
    4.29 -
    4.30 -#
    4.31 -# Commands
    4.32 -#
    4.33 -
    4.34 -error=
    4.35 -case " $(POST) " in
    4.36 -*\ doformat\ *)
    4.37 -	fdformat $(POST fd)
    4.38 -	which mkfs.$(POST fstype) > /dev/null 2>&1 &&
    4.39 -	mkfs.$(POST fstype) $(POST fd)
    4.40 -	;;
    4.41 -*\ write\ *)
    4.42 -	if [ "$(FILE fromimage tmpname)" ]; then
    4.43 -		dd if=$(FILE fromimage tmpname) of=$(POST tofd)
    4.44 -		rm -f $(FILE fromimage tmpname)
    4.45 -	else
    4.46 -		error="$(msg err 'Broken FILE support')"
    4.47 -	fi ;;
    4.48 -*\ read\ *)
    4.49 -	dd if=$(POST fromfd) of=$(POST toimage)
    4.50 -	;;
    4.51 -*\ build\ *)
    4.52 -	cmd=""
    4.53 -	toremove=""
    4.54 -	while read key file ; do
    4.55 -		[ "$(FILE $file size)" ] || continue
    4.56 -		for i in $(seq 1 $(FILE $file count)); do
    4.57 -			cmd="$cmd $key $(FILE $file tmpname $i)"
    4.58 -			toremove="$toremove $(FILE $file tmpname $i)"
    4.59 -		done
    4.60 -	done <<EOT
    4.61 -bootloader	kernel
    4.62 ---initrd	initrd
    4.63 ---initrd	initrd2
    4.64 ---info		info
    4.65 -EOT
    4.66 -	error="$(msg err 'Broken FILE support !')
    4.67 -		<pre>$(httpinfo)</pre>"
    4.68 -	if [ "$cmd" ]; then
    4.69 -		for key in cmdline rdev video format mem ; do
    4.70 -			[ "$(POST $key)" ] || continue
    4.71 -			cmd="$cmd --$key '$(POST $key)'"
    4.72 -		done 
    4.73 -		[ "$(POST edit)" ] || cmd="$cmd --dont-edit-cmdline"
    4.74 -		TITLE="$(_ 'TazPanel - floppy')"
    4.75 -		header
    4.76 -		xhtml_header
    4.77 -		cd $(POST workdir)
    4.78 -		eval $cmd 2>&1
    4.79 -		echo "</pre>"
    4.80 -		[ "$toremove" ] && rm -f $toremove && rmdir $(dirname $toremove)
    4.81 -		xhtml_footer
    4.82 -		exit 0
    4.83 -	fi
    4.84 -	;;
    4.85 -esac
    4.86 -
    4.87 -listfd()
    4.88 -{
    4.89 -	echo "<select name=\"$1\">"
    4.90 -	ls /dev/fd[0-9]* | sed 's|.*|<option>&</option>|'
    4.91 -	echo "</select>"
    4.92 -}
    4.93 -
    4.94 -TITLE="$(_ 'TazPanel - floppy')"
    4.95 -header
    4.96 -xhtml_header
    4.97 -echo "$error"
    4.98 -
    4.99 -cat <<EOT
   4.100 -<form method="post" enctype="multipart/form-data">
   4.101 -EOT
   4.102 -[ -w /dev/fd0 ] && cat <<EOT
   4.103 -<section>
   4.104 -	<header>
   4.105 -		$(_ 'Floppy disk format')
   4.106 -	</header>
   4.107 -	<button type="submit" name="doformat" data-icon="start" >$(_ 'Format disk'  )</button>
   4.108 -	$(listfd fd) filesystem:
   4.109 -	<select name "fstype">
   4.110 -		<option>$(_ 'none')</option>
   4.111 -		$(ls /sbin/mkfs.* | sed '/dev/d;s|.*/mkfs.\(.*\)|<option>\1</option>|')
   4.112 -	</select>
   4.113 -</section>
   4.114 -
   4.115 -<section>
   4.116 -	<header>
   4.117 -		$(_ 'Floppy disk transfert')
   4.118 -	</header>
   4.119 -<table>
   4.120 -	<tbody>
   4.121 -	<tr>
   4.122 -	<td>
   4.123 -	<button type="submit" name="write" data-icon="start" >$(_ 'Write image'  )</button>
   4.124 -	$(listfd tofd) &lt;&lt;&lt; <input name="fromimage" type="file">
   4.125 -	</td>
   4.126 -	</tr>
   4.127 -	<tr>
   4.128 -	<td>
   4.129 -	<button type="submit" name="read" data-icon="start" >$(_ 'Read image'  )</button>
   4.130 -	$(listfd fromfd) &gt;&gt;&gt; <input name="toimage" type="text" value="/tmp/floppy.img">
   4.131 -	<td>
   4.132 -	</tr>
   4.133 -	</tbody>
   4.134 -</table>
   4.135 -</section>
   4.136 -EOT
   4.137 -cat <<EOT
   4.138 -<section>
   4.139 -	<header>
   4.140 -		$(_ 'Boot floppy set builder')
   4.141 -	</header>
   4.142 -
   4.143 -<table>
   4.144 -	<tbody><tr>
   4.145 -	<td>$(_ 'Linux kernel:')</td>
   4.146 -	<td><input name="kernel" size="37" type="file"> <i>$(_ 'required')</i></td>
   4.147 -	</tr>
   4.148 -	<tr>
   4.149 -	<td>$(_ 'Initramfs / Initrd:')</td>
   4.150 -	<td><input name="initrd[]" size="37" type="file" multiple> <i>$(_ 'optional')</i></td>
   4.151 -	</tr>
   4.152 -	<tr>
   4.153 -	<td>$(_ 'Extra initramfs:')</td>
   4.154 -	<td><input name="initrd2[]" size="37" type="file" multiple> <i>$(_ 'optional')</i></td>
   4.155 -	</tr>
   4.156 -	<tr>
   4.157 -	<td>$(_ 'Boot message:')</td>
   4.158 -	<td><input name="info" size="37" type="file"> <i>$(_ 'optional')</i></td>
   4.159 -	</tr>
   4.160 -	<tr>
   4.161 -	<td>$(_ 'Default cmdline:')</td>
   4.162 -	<td id="cmdline"><input name="cmdline" size="36" type="text"> <input name="edit" checked="checked" type="checkbox">$(_ 'edit')
   4.163 -	<i>$(_ 'optional')</i></td>
   4.164 -	</tr>
   4.165 -	<tr>
   4.166 -	<td>$(_ 'Root device:')</td>
   4.167 -	<td><input name="rdev" size="8" value="/dev/ram0" type="text">
   4.168 -	&nbsp;&nbsp;$(_ 'Flags:') <select name="flags">
   4.169 -		<option selected="selected" value="1">R/O</option>
   4.170 -		<option value="0">R/W</option>
   4.171 -	</select>
   4.172 -	&nbsp;&nbsp;VESA: <select name="video">
   4.173 -		<option value="-3">Ask</option>
   4.174 -<option value="-2">Extended</option>
   4.175 -<option value="-1" selected="selected">Standard</option>
   4.176 -<option value="0">0</option>
   4.177 -<option value="1">1</option>
   4.178 -<option value="2">2</option>
   4.179 -<option value="3">3</option>
   4.180 -<option value="4">4</option>
   4.181 -<option value="5">5</option>
   4.182 -<option value="6">6</option>
   4.183 -<option value="7">7</option>
   4.184 -<option value="8">8</option>
   4.185 -<option value="9">9</option>
   4.186 -<option value="10">10</option>
   4.187 -<option value="11">11</option>
   4.188 -<option value="12">12</option>
   4.189 -<option value="13">13</option>
   4.190 -<option value="14">14</option>
   4.191 -<option value="15">15</option>
   4.192 -<option value="3840">80x25</option>
   4.193 -<option value="3841">80x50</option>
   4.194 -<option value="3842">80x43</option>
   4.195 -<option value="3843">80x28</option>
   4.196 -<option value="3845">80x30</option>
   4.197 -<option value="3846">80x34</option>
   4.198 -<option value="3847">80x60</option>
   4.199 -<option value="778">132x43</option>
   4.200 -<option value="777">132x25</option>
   4.201 -<option value="824">320x200x8</option>
   4.202 -<option value="781">320x200x15</option>
   4.203 -<option value="782">320x200x16</option>
   4.204 -<option value="783">320x200x24</option>
   4.205 -<option value="800">320x200x32</option>
   4.206 -<option value="818">896x672x24</option>
   4.207 -<option value="915">320x240x15</option>
   4.208 -<option value="821">320x240x16</option>
   4.209 -<option value="917">320x240x24</option>
   4.210 -<option value="918">320x240x32</option>
   4.211 -<option value="819">896x672x32</option>
   4.212 -<option value="931">400x300x15</option>
   4.213 -<option value="822">400x300x16</option>
   4.214 -<option value="933">400x300x24</option>
   4.215 -<option value="934">400x300x32</option>
   4.216 -<option value="820">512x384x8</option>
   4.217 -<option value="947">512x384x15</option>
   4.218 -<option value="823">512x384x16</option>
   4.219 -<option value="949">512x384x24</option>
   4.220 -<option value="950">512x384x32</option>
   4.221 -<option value="962">640x350x8</option>
   4.222 -<option value="963">640x350x15</option>
   4.223 -<option value="964">640x350x16</option>
   4.224 -<option value="965">640x350x24</option>
   4.225 -<option value="966">640x350x32</option>
   4.226 -<option value="768">640x400x8</option>
   4.227 -<option value="899">640x400x15</option>
   4.228 -<option value="825">640x400x16</option>
   4.229 -<option value="901">640x400x24</option>
   4.230 -<option value="902">640x400x32</option>
   4.231 -<option value="769">640x480x8</option>
   4.232 -<option value="784">640x480x15</option>
   4.233 -<option value="785">640x480x16</option>
   4.234 -<option value="786">640x480x24</option>
   4.235 -<option value="826">640x480x32</option>
   4.236 -<option value="879">800x500x8</option>
   4.237 -<option value="880">800x500x15</option>
   4.238 -<option value="881">800x500x16</option>
   4.239 -<option value="882">800x500x24</option>
   4.240 -<option value="883">800x500x32</option>
   4.241 -<option value="771">800x600x8</option>
   4.242 -<option value="787">800x600x15</option>
   4.243 -<option value="788">800x600x16</option>
   4.244 -<option value="789">800x600x24</option>
   4.245 -<option value="827">800x600x32</option>
   4.246 -<option value="815">896x672x8</option>
   4.247 -<option value="816">1600x1200x8</option>
   4.248 -<option value="817">1600x1200x16</option>
   4.249 -<option value="874">1024x640x8</option>
   4.250 -<option value="875">1024x640x15</option>
   4.251 -<option value="876">1024x640x16</option>
   4.252 -<option value="877">1024x640x24</option>
   4.253 -<option value="878">1024x640x32</option>
   4.254 -<option value="773">1024x768x8</option>
   4.255 -<option value="790">1024x768x15</option>
   4.256 -<option value="791">1024x768x16</option>
   4.257 -<option value="792">1024x768x24</option>
   4.258 -<option value="828">1024x768x32</option>
   4.259 -<option value="869">1152x720x8</option>
   4.260 -<option value="870">1152x720x15</option>
   4.261 -<option value="871">1152x720x16</option>
   4.262 -<option value="872">1152x720x24</option>
   4.263 -<option value="873">1152x720x32</option>
   4.264 -<option value="775">1280x1024x8</option>
   4.265 -<option value="793">1280x1024x15</option>
   4.266 -<option value="794">1280x1024x16</option>
   4.267 -<option value="795">1280x1024x24</option>
   4.268 -<option value="829">1280x1024x32</option>
   4.269 -<option value="835">1400x1050x8</option>
   4.270 -<option value="837">1400x1050x16</option>
   4.271 -<option value="838">1400x1040x24</option>
   4.272 -<option value="864">1440x900x15</option>
   4.273 -<option value="866">1440x900x16</option>
   4.274 -<option value="867">1440x900x24</option>
   4.275 -<option value="868">1440x900x32</option>
   4.276 -<option value="893">1920x1200x8</option>
   4.277 -	</select>
   4.278 -	</td>
   4.279 -	</tr>
   4.280 -	<tr>
   4.281 -	<td>$(_ 'Output directory:')</td>
   4.282 -	<td id="workdir"><input name="workdir" size="36" type="text" value="/tmp"></td>
   4.283 -	</tr>
   4.284 -	<tr>
   4.285 -	<td>$(_ 'Floppy size:')</td>
   4.286 -	<td><select name="format">
   4.287 -		<optgroup label="5&frac14; SD">
   4.288 -		<option value="360">360 KB</option>
   4.289 -		</optgroup>
   4.290 -		<optgroup label="3&frac12; SD">
   4.291 -		<option value="720">720 KB</option>
   4.292 -		</optgroup>
   4.293 -		<optgroup label="5&frac14; HD">
   4.294 -		<option value="1200">1.20 MB</option>
   4.295 -		</optgroup>
   4.296 -		<optgroup label="3&frac12; HD">
   4.297 -		<option value="1440" selected="selected">1.44 MB</option>
   4.298 -		<option value="1600">1.60 MB</option>
   4.299 -		<option value="1680">1.68 MB</option>
   4.300 -		<option value="1722">1.72 MB</option>
   4.301 -		<option value="1743">1.74 MB</option>
   4.302 -		<option value="1760">1.76 MB</option>
   4.303 -		<option value="1840">1.84 MB</option>
   4.304 -		<option value="1920">1.92 MB</option>
   4.305 -		<option value="1968">1.96 MB</option>
   4.306 -		</optgroup>
   4.307 -		<optgroup label="3&frac12; ED">
   4.308 -		<option value="2880">2.88 MB</option>
   4.309 -		<option value="3360">3.36 MB</option>
   4.310 -		<option value="3444">3.44 MB</option>
   4.311 -		<option value="3840">3.84 MB</option>
   4.312 -		<option value="3936">3.92 MB</option>
   4.313 -		</optgroup>
   4.314 -		<option value="0">$(_ 'no limit')</option>
   4.315 -	</select>&nbsp;
   4.316 -	$(_ 'RAM used')&nbsp;<select name="mem">
   4.317 -		<option selected="selected" value="16">16 MB</option>
   4.318 -		<option value="15">15 MB</option>
   4.319 -		<option value="14">14 MB</option>
   4.320 -		<option value="13">13 MB</option>
   4.321 -		<option value="12">12 MB</option>
   4.322 -		<option value="11">11 MB</option>
   4.323 -		<option value="10">10 MB</option>
   4.324 -		<option value="9">9 MB</option>
   4.325 -		<option value="8">8 MB</option>
   4.326 -		<option value="7">7 MB</option>
   4.327 -		<option value="6">6 MB</option>
   4.328 -		<option value="5">5 MB</option>
   4.329 -		<option value="4">4 MB</option>
   4.330 -	</select>&nbsp;
   4.331 -	<button type="submit" name="build" data-icon="start" >$(_ 'Build floppy set'  )</button>
   4.332 -	</td>
   4.333 -	</tr>
   4.334 -</tbody></table>
   4.335 -<footer>
   4.336 -<p>
   4.337 -$(_ 'Note') 1: $(_ 'the extra initramfs may be useful to add your own configuration files.')
   4.338 -</p>
   4.339 -<p>
   4.340 -$(_ 'Note') 2: $(_ 'the keyboard is read for ESC or ENTER on every form feed (ASCII 12) in the boot message.')
   4.341 -</p>
   4.342 -</footer>
   4.343 -</section>
   4.344 -</form>
   4.345 -EOT
   4.346 -
   4.347 -xhtml_footer
   4.348 -exit 0
     5.1 --- a/tazpanel-extra/stuff/powersaving.cgi	Sun Aug 02 15:15:17 2015 +0200
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,177 +0,0 @@
     5.4 -#!/bin/sh
     5.5 -#
     5.6 -# Hardware / power saving
     5.7 -#
     5.8 -# Copyright (C) 2011-2015 SliTaz GNU/Linux - BSD License
     5.9 -#
    5.10 -
    5.11 -# Common functions from libtazpanel
    5.12 -. lib/libtazpanel
    5.13 -get_config
    5.14 -
    5.15 -case "$1" in
    5.16 -	menu)
    5.17 -		cat <<EOT
    5.18 -<li><a data-icon="display" href="powersaving.cgi" data-root>$(_ 'Power saving')</a></li>
    5.19 -EOT
    5.20 -		exit
    5.21 -esac
    5.22 -
    5.23 -header
    5.24 -
    5.25 -TITLE=$(_ 'Hardware')
    5.26 -
    5.27 -xhtml_header "$(_ 'Power saving')"
    5.28 -
    5.29 -## DPMS ##
    5.30 -cat <<EOT
    5.31 -<section>
    5.32 -	<header>
    5.33 -		<span data-icon="display">DPMS (Display Power Management Signaling)</span>
    5.34 -	</header>
    5.35 -
    5.36 -	<div>$(_ "DPMS enables power saving behaviour of monitors when the computer is not in use.")</div>
    5.37 -	<form method="post" class="wide">
    5.38 -		<input type="hidden" name="powersaving" value="set"/>
    5.39 -EOT
    5.40 -
    5.41 -monitor_conf='/etc/X11/xorg.conf.d/50-Monitor.conf'
    5.42 -if [ ! -s "$monitor_conf" ]; then
    5.43 -	# Config is absent, so create it
    5.44 -	cat > "$monitor_conf" <<EOT
    5.45 -Section "Monitor"
    5.46 -	Identifier   "Monitor0"
    5.47 -	VendorName   "Monitor Vendor"
    5.48 -	ModelName    "Monitor Model"
    5.49 -	Option "DPMS" "true"
    5.50 -EndSection
    5.51 -EOT
    5.52 -fi
    5.53 -
    5.54 -cat <<EOT
    5.55 -		<table class="wide zebra">
    5.56 -			<thead>
    5.57 -				<tr><td>$(_ 'Identifier')</td>
    5.58 -					<td>$(_ 'Vendor name')</td>
    5.59 -					<td>$(_ 'Model name')</td>
    5.60 -					<td>$(_ 'DPMS enabled')</td>
    5.61 -				</tr>
    5.62 -			</thead>
    5.63 -EOT
    5.64 -
    5.65 -awk -F\" '{
    5.66 -	if ($1 ~ /^Section/) { I = V = M = D = ""; }
    5.67 -	if ($1 ~ /Identifier/) { I = $2; }
    5.68 -	if ($1 ~ /VendorName/) { V = $2; }
    5.69 -	if ($1 ~ /ModelName/)  { M = $2; }
    5.70 -	if ($1 ~ /Option/ && $2 ~ /DPMS/) { D = $4; }
    5.71 -	if ($1 ~ /EndSection/) {
    5.72 -		if (D == "false") { D = ""; } else { D = "checked"; }
    5.73 -		printf "<tr><td data-icon=\"display\">%s</td><td>%s</td><td>%s</td><td>", I, V, M;
    5.74 -		printf "<label><input type=\"checkbox\" name=\"%s\" %s/>DPMS</label>", I, D;
    5.75 -		printf "</td></tr>\n";
    5.76 -	}
    5.77 -}' $monitor_conf
    5.78 -
    5.79 -layout_conf='/etc/X11/xorg.conf.d/10-ServerLayout.conf'
    5.80 -
    5.81 -cat <<EOT
    5.82 -		</table>
    5.83 -		<input type="hidden" name="ids" value="$(
    5.84 -			awk -F\" '$1 ~ /Identifier/ { printf "%s ", $2; }' $monitor_conf)"/>
    5.85 -
    5.86 -		<table>
    5.87 -			<tr><td>
    5.88 -					<fieldset>
    5.89 -						<legend>$(_ 'DPMS times (in minutes):')</legend>
    5.90 -						<table>
    5.91 -							<tr><td>Standby Time</td>
    5.92 -								<td><input type="number" name="StandbyTime" value="10"/></td></tr>
    5.93 -							<tr><td>Suspend Time</td>
    5.94 -								<td><input type="number" name="SuspendTime" value="20"/></td></tr>
    5.95 -							<tr><td>Off Time</td>
    5.96 -								<td><input type="number" name="OffTime"     value="30"/></td></tr>
    5.97 -						</table>
    5.98 -					</fieldset>
    5.99 -				</td>
   5.100 -				<td style="vertical-align: top">
   5.101 -					<fieldset>
   5.102 -						<legend>$(_ 'Manual edit')</legend>
   5.103 -						<a data-icon="conf" href="index.cgi?file=$monitor_conf">$(basename $monitor_conf)</a><br/>
   5.104 -						<a data-icon="conf" href="index.cgi?file=$layout_conf">$(basename $layout_conf)</a>
   5.105 -					</fieldset>
   5.106 -					<pre>$(for i in $(POST); do echo "$i: " $(POST $i); done)</pre>
   5.107 -				</td>
   5.108 -			</tr>
   5.109 -		</table>
   5.110 -		<footer>
   5.111 -			<button type="submit" data-icon="ok">$(_ 'Change')</button>
   5.112 -		</footer>
   5.113 -	</form>
   5.114 -</section>
   5.115 -EOT
   5.116 -
   5.117 -
   5.118 -## CPU ##
   5.119 -
   5.120 -cpu=$(awk -F: '$1 ~ "model name" {
   5.121 -	gsub(/\(TM\)/,"™",$2); gsub(/\(R\)/,"®",$2);
   5.122 -	split($2,c,"@");
   5.123 -	print "<span data-icon=\"cpu\">" c[1] "</span>";
   5.124 -}' /proc/cpuinfo)
   5.125 -multiplier=$(echo "$cpu" | wc -l)
   5.126 -[ "$multiplier" -ne 1 ] && cpu="$multiplier × $(echo "$cpu" | head -n1)"
   5.127 -
   5.128 -freq=$(awk -F: 'BEGIN{N=0}$1~"MHz"{printf "%d:<b>%s</b>MHz ",N,$2; N++}' /proc/cpuinfo)
   5.129 -
   5.130 -cat <<EOT
   5.131 -<section>
   5.132 -	<header><span data-icon="cpu">$(_ 'CPU')</span></header>
   5.133 -
   5.134 -	<div>$(_ "CPU frequency scaling enables the operating system to scale the \
   5.135 -CPU frequency up or down in order to save power. CPU frequencies can be scaled \
   5.136 -automatically depending on the system load, in responce to ACPI events, or \
   5.137 -manually by userspace programs.")</div>
   5.138 -
   5.139 -	<table class="wide zebra">
   5.140 -		<tr><td>$(_ 'Model name')</td><td>$cpu</td></tr>
   5.141 -		<tr><td>$(_ 'Current frequency')</td><td>$freq</td></tr>
   5.142 -		<tr><td>$(_ 'Current driver')</td><td>$(cat '/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver')
   5.143 -		<tr><td>$(_ 'Current governor')</td><td>$(cat '/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor')
   5.144 -	</table>
   5.145 -</section>
   5.146 -EOT
   5.147 -
   5.148 -# As of Kernel 3.4, the native CPU module is loaded automatically.
   5.149 -if [ -d "/lib/modules/$(uname -r)/kernel/drivers/cpufreq" ]; then
   5.150 -	cd /lib/modules/$(uname -r)/kernel/drivers/cpufreq
   5.151 -	cat <<EOT
   5.152 -<section>
   5.153 -	<header>$(_ 'Kernel modules')</header>
   5.154 -	<table class="wide zebra summary">
   5.155 -		<thead>
   5.156 -			<tr><td>$(_ 'Module')</td>
   5.157 -				<td>$(_ 'Description')</td>
   5.158 -			</tr>
   5.159 -		</thead>
   5.160 -EOT
   5.161 -	lsmod="$(lsmod | awk '{printf "%s " $1}') "
   5.162 -
   5.163 -	for module in $(ls | grep -v 'mperf\|speedstep-lib'); do
   5.164 -		module="${module%.ko.xz}"; module="${module//-/_}"
   5.165 -		if echo $lsmod | grep -q " $module "; then icon='ok'; else icon='cancel'; fi
   5.166 -		echo "<tr><td><span data-icon=\"$icon\">$module</span></td><td>"
   5.167 -		modinfo $module | awk -F: '$1=="description"{
   5.168 -			gsub(/\(TM\)/,"™",$2); gsub(/\(R\)/,"®",$2);
   5.169 -			gsub(/VIA|C7|Cyrix|MediaGX|NatSemi|Geode|Transmeta|Crusoe|Efficeon|Pentium™ 4|Xeon™|AMD|K6-2\+|K6-3\+|K7|Athlon 64|Opteron|Intel/,"<b>&</b>",$2);
   5.170 -			print $2}'
   5.171 -		echo "</td></tr>"
   5.172 -	done
   5.173 -	cat <<EOT
   5.174 -	</table>
   5.175 -</section>
   5.176 -EOT
   5.177 -fi
   5.178 -
   5.179 -xhtml_footer
   5.180 -exit 0
     6.1 --- a/tazpanel/receipt	Sun Aug 02 15:15:17 2015 +0200
     6.2 +++ b/tazpanel/receipt	Sun Aug 02 20:30:04 2015 +0200
     6.3 @@ -1,7 +1,7 @@
     6.4  # SliTaz package receipt.
     6.5  
     6.6  PACKAGE="tazpanel"
     6.7 -VERSION="513"
     6.8 +VERSION="516"
     6.9  CATEGORY="system-tools"
    6.10  SHORT_DESC="SliTaz administration and configuration panel."
    6.11  MAINTAINER="pankso@slitaz.org"
    6.12 @@ -29,8 +29,6 @@
    6.13  	cp -a $install/* $fs
    6.14  	# Init script use tazpanel cmdline
    6.15  	cd $fs/etc/init.d && ln -s ../../usr/bin/tazpanel .
    6.16 -
    6.17 -	cd $fs/var/www/tazpanel; rm test.cgi locale.cgi powersaving.cgi
    6.18  }
    6.19  
    6.20  # Pre and post install commands for Tazpkg.