Skip to content
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

Check backup path for nil also #54

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions lib/uuidtools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -636,9 +636,13 @@ def self.ifconfig(all=nil)

# if it does not exist, try the ip command
if ifconfig_path == nil
ifconfig_path = "#{UUID.ip_path} addr list"
# all makes no sense when using ip(1)
all = nil
ip_path = UUID.ip_path
# check to make sure ip exists
if !iip_path.nil?
rcalosso marked this conversation as resolved.
Show resolved Hide resolved
ifconfig_path = "#{ip_path} addr list"
# all makes no sense when using ip(1)
all = nil
end
end

all_switch = all == nil ? "" : "-a"
Expand Down