Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 77a90ff

Browse files
NarineMlagalbra
authored andcommitted
Simplify python ctypes detection
1 parent 222ad1e commit 77a90ff

2 files changed

Lines changed: 3 additions & 16 deletions

File tree

docs/OMS-Agent-for-Linux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The OMS agent for Linux is provided in a self-extracting and installable shell s
7171
**Installing the agent**
7272

7373
1. Transfer the appropriate bundle (x86 or x64) to your Linux computer, using scp/sftp.
74-
2. Install the bundle by using the `--install` or `--upgrade` argument. Note: use the `--upgrade` argument if any existing packages are installed, as would be the case if the system Center Operations Manager agent for Linux is already installed. To onboard to Operations Management Suite during installation, provide the `-w <WorkspaceID>` and `-s <Shared Key>` parameters.
74+
2. Install the bundle by using the `--install` or `--upgrade` argument. Note: must use the `--upgrade` argument if any dependent packages such as omi, scx, omsconfig or their older versions are installed, as would be the case if the system Center Operations Manager agent for Linux is already installed. To onboard to Operations Management Suite during installation, provide the `-w <WorkspaceID>` and `-s <Shared Key>` parameters.
7575

7676
**To install and onboard directly:**
7777
```

installer/bundle/bundle_skel.sh

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -370,21 +370,8 @@ python_ctypes_installed() {
370370
# Check for Python ctypes library (required for omsconfig)
371371
hasCtypes=1
372372
echo "Checking for ctypes python module ..."
373-
374-
# Check #1: Attempt to create and execute a temporary file importing ctypes
375-
tempFile=`mktemp`
376-
377-
cat <<EOF > $tempFile
378-
#! /usr/bin/python
379-
import ctypes
380-
EOF
381-
382-
chmod u+x $tempFile
383-
$tempFile 1> /dev/null 2> /dev/null
384-
[ $? -eq 0 ] && hasCtypes=0
385-
rm $tempFile
386-
387-
# Check #2: Attempt to run python with the single import command
373+
374+
# Attempt to run python with the single import command
388375
python -c "import ctypes" 1> /dev/null 2> /dev/null
389376
[ $? -eq 0 ] && hasCtypes=0
390377

0 commit comments

Comments
 (0)