#!/bin/sh # ------- # netconfig-client ncfg script to manage ca-certificates # (c) 2009 Luis Garcia # -------- set -e # PATH y variables PATH="/sbin:/bin:/usr/sbin:/usr/bin" # Funciones die(){ echo "$1" >&2 exit 1 } # main # libs . "/usr/share/llxcfg-ncfg-certs/llxcfg-ncfg-certs-common" >/dev/null 2>&1 || die "Error: file \"$_\" not found" case $1 in uninstall) # remove certificates CA_DIRS="$(llxcfg-netconfig-client getdirs "$NCFG_CERTS_NCFGDIR")" if [ "$CA_DIRS" ] ; then lliurex-certs del $CA_DIRS fi ;; install) # install certificates CA_DIRS="$(llxcfg-netconfig-client getdirs "$NCFG_CERTS_NCFGDIR")" if [ "$CA_DIRS" ] ; then lliurex-certs add $CA_DIRS fi ;; *) die "Usage: $0 {install|uninstall}" ;; esac exit 0