Skip to content

Fix Dell iDrac mib sed for BSD/MacOS #1183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

SuperQ
Copy link
Member

@SuperQ SuperQ commented May 10, 2024

The previous implementation appearently breaks on the Mac sed implementation I noticed.
This still applies the fix, but uses an intermediate temporary file that atomically moved
in place after the operation.

The previous implementation appearently breaks on the Mac `sed` implementation I noticed.
This still applies the fix, but uses an intermediate temporary file that atomically moved
in place after the operation.

Signed-off-by: Francis Begyn <[email protected]>
@SuperQ
Copy link
Member Author

SuperQ commented May 10, 2024

👓 @bastischubert

@bastischubert
Copy link
Member

bastischubert commented May 10, 2024

The iDRAC-SMIv1.mib is zero bytes after the sed (tested on macos/BSD and linux/GNU) 👎

➜  generator git:(superq/fix_idrac_awk) make mibs/.dell
>> Downloading dell to /var/folders/t_/q3d9w24n71z2yn425rr51k4w0000gn/T/tmp.CyL4gzPQIN
Archive:  /var/folders/t_/q3d9w24n71z2yn425rr51k4w0000gn/T/tmp.CyL4gzPQIN
  inflating: mibs/iDRAC-SMIv1.mib
  inflating: mibs/iDRAC-SMIv2.mib
# There are some additional characters behind MIB end that break parsing
/var/folders/t_/q3d9w24n71z2yn425rr51k4w0000gn/T/tmp.CyL4gzPQIN
mibs/iDRAC-SMIv1.mib.bak
➜  generator git:(superq/fix_idrac_awk) ls -la mibs
total 1184
drwxr-xr-x   6 basti  staff     192 10 Mai 12:18 .
drwxr-xr-x  14 basti  staff     448 10 Mai 12:18 ..
-rw-r--r--   1 basti  staff       0 10 Mai 12:18 .dell
-rw-r--r--   1 basti  staff       0 10 Mai 12:09 .do_not_remove
-rw-r--r--   1 basti  staff       0 10 Mai 12:18 iDRAC-SMIv1.mib
-rw-r--r--   1 basti  staff  605089 22 Jan 09:56 iDRAC-SMIv2.mib

@SuperQ SuperQ force-pushed the superq/fix_idrac_awk branch from 008be1c to deaaa8f Compare May 10, 2024 10:37
@SuperQ
Copy link
Member Author

SuperQ commented May 10, 2024

Fixed sed syntax.

@SuperQ
Copy link
Member Author

SuperQ commented May 11, 2024

Closing in favor of #1185

@SuperQ SuperQ closed this May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants