Realisation des scripts bootsplash sous Debian.

Realisation des scripts bootsplash sous Debian. - Codes et scripts - Linux et OS Alternatifs

Marsh Posté le 12-11-2003 à 13:44:16    

J'ai besoins d'aide :)
Un probleme avec cette fonction :

Code :
  1. function rc_splash() {
  2. max=`cat /etc/splashprog`
  3. [ "$runlevel" = "S" ] && runlevel=-1
  4. increment=$(( 150 / $max ))
  5. progress=$(( $progress + $increment ))
  6. [ $progress -gt 100 ] && progress=100
  7. echo "show $(( 65534 * $progress / 100 ))" >/proc/splash
  8. }


à l'init il m'indique qu'il est impossible d'ecrire dans /proc/splash (systeme de fichier en lecture seule)
 
je l'ai inclus dans les fichiers /etc/init.d/rcS et /etc/init.d/rc par la ligne :

Code :
  1. source /etc/init.d/rcsplash


Et j'appel la fonction par :

Code :
  1. for i in /etc/rcS.d/S??*
  2. do
  3. # Ignore dangling symlinks for now.
  4. [ ! -f "$i" ] && continue
  5. # send information to bootsplash handler.
  6. rc_splash "$i start"
  7. case "$i" in
  8.  *.sh)
  9.   # Source shell script for speed.
  10.   (
  11.    trap - INT QUIT TSTP
  12.    set start
  13.    . $i
  14.   )
  15.   ;;
  16.  *)
  17.   # No sh extension, so fork subprocess.
  18.   $i start
  19.   ;;
  20. esac
  21. done


 
Voici le script rcsplash complet :

Code :
  1. #!/bin/sh
  2. if [ ! -f /etc/splashprog ]; then
  3. maxrcS=`ls -1 /etc/rcS.d/S??* | wc -l`
  4. maxrc2=`ls -1 /etc/rc2.d/S??* | wc -l`
  5. maximum=$(( $maxrcS + $maxrc2 ))
  6. echo $maximum >/etc/splashprog
  7. fi
  8. function rc_splash() {
  9. max=`cat /etc/splashprog`
  10. [ "$runlevel" = "S" ] && runlevel=-1
  11. increment=$(( 150 / $max ))
  12. progress=$(( $progress + $increment ))
  13. [ $progress -gt 100 ] && progress=100
  14. echo "show $(( 65534 * $progress / 100 ))" >/proc/splash
  15. }


Message édité par lithium le 12-11-2003 à 13:45:19
Reply

Marsh Posté le 12-11-2003 à 13:44:16   

Reply

Marsh Posté le 12-11-2003 à 23:00:37    

up

Reply

Marsh Posté le 12-11-2003 à 23:23:14    

lle est bonnnnneeee la chhhouucrouteeee Elle est bonne la choucroute Elle permetttt de biennn paaatoogee  
 

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed