File: rebuild-security-providers

package info (click to toggle)
gcc-defaults 1.136
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 360 kB
  • ctags: 264
  • sloc: makefile: 792; python: 540; sh: 230; perl: 137
file content (19 lines) | stat: -rwxr-xr-x 502 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /bin/bash
# Rebuild the list of security providers in classpath.security

secfiles="/var/lib/security/classpath.security"

for secfile in $secfiles; do
  # check if this classpath.security file exists
  #[ -f "$secfile" ] || continue

  sed '/^security\.provider\./d' /etc/java/security/classpath.security \
      > $secfile

  count=0
  for provider in $(ls /etc/java/security/security.d)
  do
    count=$((count + 1))
    echo "security.provider.${count}=${provider#*-}" >> "$secfile"
  done
done