Changeset 580


Ignore:
Timestamp:
11/21/09 12:58:51 (2 years ago)
Author:
tschmitt
Message:
  • Linbofs:
    • linbo_cmd.sh, start(): das Beenden der ctorrent-Prozesse wurde an eine frühere Stelle im Startablauf verschoben.
    • init.sh: o neuer Parameter autostart=<int>

autostart=0 unterdrückt generally jegliche Autostart-Definition in der start.conf,
autostart=<nr> setzt den Autostart für das OS an Position <nr> in der start.conf.
Autostarteinträge für andere OS werden unterdrückt.

  • Serverskripte:
    • rsync-post.sh: die Zeit für hochgeladene Image- und Torrent-Dateien wird per touch-Befehl auf die Serverzeit gesetzt, andernfalls verweigert Bittorrent den Dienst, falls die hochgeladenen Dateien eine Erstellungszeit in der Zukunft haben.
Location:
main/linuxmuster-linbo/branches/testing
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/linuxmuster-linbo/branches/testing/debian/changelog

    r572 r580  
     1linuxmuster-linbo (1.99.13-0) unstable; urgency=low 
     2 
     3  * linbofs: 
     4    - linbo_cmd.sh, start(): moved killing ctorrent processes to earlier position in start process. 
     5    - init.sh: 
     6      o handling new parameter autostart=<int> 
     7        autostart=0 suppresses autostart generally in start.conf, 
     8        autostart=<nr> sets autostart for OS number nr in start.conf. 
     9  * server side scripting: 
     10    - rsync-post.sh: sync time for image and torrent files otherwise bittorrent gets confused 
     11      if uploaded torrent file time is in future. 
     12 
     13 -- Thomas Schmitt <schmitt@lmz-bw.de>  Sat, 21 Nov 2009 12:01:54 +0100 
     14 
    115linuxmuster-linbo (1.99.12-1) unstable; urgency=low 
    216 
  • main/linuxmuster-linbo/branches/testing/linbo/init.sh

    r530 r580  
    4040# Utilities 
    4141 
     42# test if variable is an integer 
     43isinteger () { 
     44 [ $# -eq 1 ] || return 1 
     45 case $1 in 
     46 *[!0-9]*|"") return 1;; 
     47           *) return 0;; 
     48 esac 
     49} 
     50 
    4251# DMA 
    4352enable_dma(){ 
     
    301310 fi 
    302311 echo "$RET" 
     312} 
     313 
     314# handle autostart from cmdline 
     315set_autostart() { 
     316 # count [OS] entries 
     317 local counts="$(grep -ci ^"\[OS\]" /start.conf)" 
     318 # return if autostart value is greater than number of OS entries 
     319 [ $autostart -gt $counts -o $autostart -lt 0 ] && return 
     320 # return if autostart shall be suppressed generally 
     321 if [ "$autostart" = "0" ]; then 
     322  # set all autostart parameters to no 
     323  sed -e 's|^[Aa][Uu][Tt][Oo][Ss][Tt][Aa][Rr][Tt].*|Autostart = no|g' -i /start.conf 
     324  return 
     325 fi 
     326 # autostart OS at start.conf position given by autostart parameter 
     327 local c=0 
     328 local found=0 
     329 local line="" 
     330 while read -r line; do 
     331  if echo "$line" | grep -qi ^"\[OS\]"; then 
     332   let c=+1 
     333   [ "$autostart" = "$c" ] && found=1 
     334  fi 
     335  # suppress autostart for other OS entries 
     336  echo "$line" | grep -qi ^autostart || echo "$line" >> /start.conf.new 
     337  # write autostart line for specific OS 
     338  if [ "$found" = "1" ]; then 
     339   echo "Autostart = yes" >> /start.conf.new 
     340   found=0 
     341  fi 
     342 done </start.conf 
     343 mv /start.conf.new /start.conf 
    303344} 
    304345 
     
    354395 # modify cache in start.conf if cache was given and no extra start.conf was defined 
    355396 [ -z "$extra" -a -b "$cache" ] && modify_cache /start.conf 
     397 # set autostart if given on cmdline 
     398 isinteger "$autostart" && set_autostart 
    356399 # remove reboot flag 
    357400 rmlinboreboot 
  • main/linuxmuster-linbo/branches/testing/linbo/linbo_cmd.sh

    r565 r580  
    598598  return 1 
    599599 fi 
     600 # kill torrents if any 
     601 ps w | grep ctorrent | grep -v grep &> /dev/null && killall -9 ctorrent 
    600602 
    601603 # No more timer interrupts 
     
    609611 
    610612 umount /mnt 2>/dev/null 
    611  # kill torrents if any 
    612  ps w | grep ctorrent | grep -v grep && { killall ctorrent; sleep 3; } 
    613613 sendlog 
    614614 umount /cache || umount -l /cache 2>/dev/null 
  • main/linuxmuster-linbo/branches/testing/share/rsync-post.sh

    r518 r580  
    4343   timage="$(btshowmetainfo "$LINBODIR/${FILE##*/}" | grep ^"file name" | awk '{ print $3 }')" 
    4444   echo "Torrent file for $timage detected. Restarting bittorrent service." >&2 
     45   # sync time for image and torrent files otherwise bittorrent gets confused 
     46   # if uploaded torrent file time is in future 
     47   touch "${timage}*" 
    4548   /etc/init.d/linbo-bittorrent restart >&2 
    4649   /etc/init.d/bittorrent restart >&2 
Note: See TracChangeset for help on using the changeset viewer.