Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AossCeilo
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MetObs
AossCeilo
Commits
29b7e83f
Verified
Commit
29b7e83f
authored
4 years ago
by
David Hoese
Browse files
Options
Downloads
Patches
Plain Diff
Add initial draft of ceilo adapter driver installation script
parent
1d2cfd82
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.rst
+9
-0
9 additions, 0 deletions
README.rst
scripts/reinstall_ceilo_driver.sh
+53
-0
53 additions, 0 deletions
scripts/reinstall_ceilo_driver.sh
with
62 additions
and
0 deletions
README.rst
+
9
−
0
View file @
29b7e83f
...
@@ -7,3 +7,12 @@ and higher level product generation.
...
@@ -7,3 +7,12 @@ and higher level product generation.
NOTE: Most of the code in this repository was copied from the old subversion
NOTE: Most of the code in this repository was copied from the old subversion
repository. This code was executed on python 2.6/2.7 environments, but will
repository. This code was executed on python 2.6/2.7 environments, but will
be run from python 3.6+ from now on. Some scripts may not work out of the box.
be run from python 3.6+ from now on. Some scripts may not work out of the box.
Serial Adapter
^^^^^^^^^^^^^^
To communicate with the ceilometer there is an ethernet to serial adapter
attached to it. The "rain01" server communicates to it through a special
driver from "MOXA" (the manufacturer of the adapter). This driver is
automatically installed as part of the root accounts crontab. See the
``scripts/reinstall_ceilo_driver.sh`` script for more information.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
scripts/reinstall_ceilo_driver.sh
0 → 100755
+
53
−
0
View file @
29b7e83f
#!/usr/bin/env bash
# Description: This script must be run as root and will reinstall the "MOXA"
# drivers for the ethernet to serial adapter so the ceilometer can be
# communicated with. This should be run on reboot as the driver seems to
# have trouble with kernel updates and maybe even reboots of the server.
if
[
$UID
-ne
0
]
;
echo
"ERROR: This script must be run as root (UID 0)."
exit
1
fi
TARBALL
=
"/opt/metobs/misc/npreal2_1.18.65_build_17062316.tgz"
if
[
!
-f
$TARBALL
]
;
then
echo
"ERROR: Source tarball does not exist"
exit
1
fi
SRC_DIR
=
"/tmp/moxa"
if
[
!
-d
$SRC_DIR
]
;
then
cd
`
dirname
$SRC_DIR
`
tar
-xzf
$TARBALL
if
[
!
-d
$SRC_DIR
]
;
then
echo
"ERROR: Could not extract moxa drivers"
exit
1
fi
fi
DRIVER_DST
=
"/usr/lib/npreal2/driver"
# Uninstall the old drivers
if
[
-d
$DRIVER_DST
]
;
then
cd
$DRIVER_DST
./mxuninst
fi
cd
"
${
SRC_DIR
}
/kernel3.x"
/usr/bin/expect <
(
cat
<<
EOF
spawn ./mxinst SP1
expect "Do you want to continue installing?"
send "N
\r
"
expect eof
EOF
)
# Add the server
cd
$DRIVER_DST
./mxaddsvr 192.168.16.27 4
status
=
$?
if
[
$?
-ne
0]
;
then
echo
"ERROR: Could not install driver"
exit
1
fi
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment