-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
teach report to output conserver config
manage-iocs report '' conserver will generate results suitable to be #included by conserver.cf Also add update-iocs-cf to place the config in a known
- Loading branch information
Michael Davidsaver
committed
May 9, 2011
1 parent
501fdde
commit b5efa24
Showing
7 changed files
with
74 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
etc/init.d | ||
etc/default | ||
usr/bin | ||
usr/sbin | ||
usr/share/sysv-rc-softioc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
|
||
# base directory for IOC instance data (st.cmd, db, ...) | ||
SOFTBASE=/epics/iocs | ||
|
||
# location for generated conserver config | ||
#IOCSCF=/etc/conserver/iocs.cf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
|
||
die() { | ||
echo "$1" >&2 | ||
exit 1 | ||
} | ||
|
||
. /etc/default/epics-softioc | ||
|
||
[ -d /etc/conserver ] || exit 0 | ||
|
||
tmp=$(tempfile) || die "Failed to create tempfile" | ||
|
||
echo "## Generated by update-iocs-cf" > "$tmp" | ||
|
||
manage-iocs report '' conserver >> "$tmp" || die "Failed to generate config" | ||
|
||
if mv -f "$tmp" "${IOCSCF:=/etc/conserver/iocs.cf}" | ||
then | ||
chmod a+r "${IOCSCF:=/etc/conserver/iocs.cf}" | ||
# poke daemon to reread config files | ||
if type invoke-rc.d 2>&1 >/dev/null; then | ||
invoke-rc.d conserver-server reload | ||
else | ||
/etc/init.d/conserver-server reload | ||
fi | ||
else | ||
echo "Could not update /etc/conserver/iocs.cf" | ||
fi | ||
|
||
rm -f "$tmp" |