Changeset 937


Ignore:
Timestamp:
Jan 14, 2008 10:05:56 PM (5 years ago)
Author:
dkg
Message:

debirf: made xkiosk back off if there are 5 restarts in a single minute. (closes #74).

Location:
trunk/debirf
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/debirf/debian/changelog

    r931 r937  
    2121  * changed old "networking" module to "network" 
    2222  * added root-passwd module, and added it to xkiosk profile. 
     23  * added Vcs-Svn, Vcs-Browser, and XS-Dm-Upload-Allowed fields to 
     24    debian/control 
     25  * make xkiosk back off if there are 5 restarts in under a minute  
     26    (closes CMRG #74) 
    2327 
    2428 -- Jameson Rollins <jrollins@fifthhorseman.net>  Sun, 13 Jan 2008 22:01:57 -0500 
  • trunk/debirf/fs/usr/share/debirf/modules/xkiosk

    r927 r937  
    8989# creat run script 
    9090# guest users starts X 
    91 cat <<EOF > "$RUNIT_DIR_DEBIRF"/run 
     91cat <<'EOF' > "$RUNIT_DIR_DEBIRF"/run 
    9292#!/bin/sh 
    9393exec 2>&1 
     94 
     95# only allow 5 attempts at starting up X each minute.  This gives 
     96# debirf admins a chance to fix from the console if there's repeated 
     97# failing invocations of the X server (see 
     98# http://cmrg.fifthhorseman.net/ticket/74) 
     99 
     100BUCKETDIR=./bucket 
     101mkdir -p "$BUCKETDIR" 
     102find "$BUCKETDIR" -type f '!' -cmin 1 -delete 
     103if [ $(find "$BUCKETDIR" -type f | wc -l ) -ge 5 ]; then 
     104    echo "5 or more retries in the last minute.  Waiting a minute..." 
     105    sleep 60 
     106fi 
     107touch "$BUCKETDIR"/$(date +%s) 
     108 
    94109exec chpst -u guest:audio:video -e env /usr/bin/startx 
    95110EOF 
Note: See TracChangeset for help on using the changeset viewer.