mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-04 06:15:24 +00:00
8809048765
IPMI-capable hardware. PR: ports/73249 Submitted by: Dmitry Frolov <frol@nov.net>
28 lines
607 B
Bash
28 lines
607 B
Bash
#!/bin/sh
|
|
|
|
conffiles="etc/fish/fish.scm etc/fish/sensors-conf.scm"
|
|
rundir="/var/lib/freeipmi"
|
|
logdir="/var/log/freeipmi"
|
|
|
|
case "$2" in
|
|
POST-INSTALL)
|
|
for file in $conffiles; do
|
|
[ -f "$PKG_PREFIX/$file" ] || \
|
|
cp "$PKG_PREFIX/$file-dist" "$PKG_PREFIX/$file"
|
|
done
|
|
|
|
mkdir -p "$rundir" "$logdir" && \
|
|
chmod 0700 "$rundir" "$logdir"
|
|
touch "$rundir/ipckey"
|
|
;;
|
|
DEINSTALL)
|
|
for file in etc/fish/fish.scm etc/fish/sensors-conf.scm; do
|
|
cmp -s "$PKG_PREFIX/$file" "$PKG_PREFIX/$file-dist" && \
|
|
rm -f $PKG_PREFIX/$file
|
|
done
|
|
|
|
rm -f "$rundir/ipckey"
|
|
rmdir "$rundir" "$logdir" 2>/dev/null || :
|
|
;;
|
|
esac
|