home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / sbin / rebuild-security-providers < prev    next >
Encoding:
Text File  |  2007-02-16  |  502 b   |  20 lines

  1. #! /bin/bash
  2. # Rebuild the list of security providers in classpath.security
  3.  
  4. secfiles="/var/lib/security/classpath.security"
  5.  
  6. for secfile in $secfiles; do
  7.   # check if this classpath.security file exists
  8.   #[ -f "$secfile" ] || continue
  9.  
  10.   sed '/^security\.provider\./d' /etc/java/security/classpath.security \
  11.       > $secfile
  12.  
  13.   count=0
  14.   for provider in $(ls /etc/java/security/security.d)
  15.   do
  16.     count=$((count + 1))
  17.     echo "security.provider.${count}=${provider#*-}" >> "$secfile"
  18.   done
  19. done
  20.