#! /bin/sh

if [ "$1" = "--version" ]
then
cat << EOF
ccs-savepolicy 1.5.2

Copyright (C) 2005-2007 NTT DATA CORPORATION.

This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
EOF
elif [ "$1" = "--help" ]
then
cat << EOF
Usage: ccs-savepolicy [s][e][d][a][f]

This program saves TOMOYO Linux's policy from kernel into files.

 s     Save system_policy. ( /etc/ccs/system_policy.conf )

 e     Save exception_policy. ( /etc/ccs/exception_policy.conf )

 d     Save domain_policy. ( /etc/ccs/domain_policy.conf )

 a     Save system_policy, exception_policy and domain_policy. This is default.

 f     Forcefully save even if the on-memory policy and the on-disk policy are identical.

Examples:

# ccs-savepolicy
 Save system_policy, exception_policy and domain_policy.

# ccs-savepolicy e
 Save exception_policy.

EOF
else
cat << EOF | help2man -i - -N -s 8 -n "Save TOMOYO Linux's policy" $0 | gzip -9 > man8/ccs-savepolicy.8.gz
[SEE ALSO]

 ccs-loadpolicy (8)

[NOTES]

 This is a symbolic link to /usr/lib/ccs/savepolicy .

[AUTHORS]

 penguin-kernel _at_ I-love.SAKURA.ne.jp

EOF
fi
exit 0
