Imported Upstream version 3.3.2
[debian/amanda] / packaging / common / post_rm_functions.sh
1 #!/bin/sh
2
3 # ------------- Begin Post Removal Functions -----------------
4 # Functions used for post removal actions
5
6 rm_xinetd() {
7     # Remove the xinetd configuration file $1.  check_xinetd should be
8     # executed first.
9     logger "Removing xinetd configuration $1"
10     log_output_of rm ${SYSCONFDIR}/xinetd.d/$1
11 }
12
13 rm_inetd() {
14     # Remove amanda entries from inetd.conf
15     logger "Removing amanda's inetd.conf entries"
16     log_output_of sed -i "/^amanda .* amandad/d"
17 }
18
19 remove_smf() {
20     # Remove the amanda service from solaris style service framework.
21     ret=0; export ret
22     logger "Removing amanda's smf entry"
23     log_output_of svcadm disable $1 || { ret=1; }
24     log_output_of svccfg delete $1 || { ret=1; }
25     return $ret
26 }
27
28 rm_user() {
29     # Delete the user provided as first parameter ($1)
30     logger "Deleting user: $1"
31     log_output_of userdel $1
32 }
33
34 # ------------- End Post Removal Functions -----------------