-
Notifications
You must be signed in to change notification settings - Fork 784
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
Strict patch #2968
Strict patch #2968
Conversation
68cfa91
to
ccb645c
Compare
65e6182
to
9e378a5
Compare
@@ -123,7 +123,7 @@ refresh_opt_in_local_config() { | |||
if $(grep -qE "^$opt=" $config_file); then | |||
run_with_sudo "$SNAP/bin/sed" -i "s@^$opt=.*@$replace_line@" $config_file | |||
else | |||
run_with_sudo "$SNAP/bin/sed" -i "$ a $replace_line" "$config_file" | |||
run_with_sudo "$SNAP/bin/sed" -i "1i$replace_line" "$config_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is on purpose. The way run_with_sudo works at the moment does not allow for spaces in the arguments passed.
if (is_strict) | ||
then | ||
snapctl kill snap.microk8s.daemon-kubelite.service --signal=SIGKILL &>/dev/null || true | ||
snapctl kill snap.microk8s.daemon-kubelet.service --signal=SIGKILL &>/dev/null || true | ||
snapctl kill snap.microk8s.daemon-containerd.service --signal=SIGKILL &>/dev/null || true | ||
else | ||
run_with_sudo systemctl kill snap.microk8s.daemon-kubelite.service --signal=SIGKILL &>/dev/null || true | ||
run_with_sudo systemctl kill snap.microk8s.daemon-kubelet.service --signal=SIGKILL &>/dev/null || true | ||
run_with_sudo systemctl kill snap.microk8s.daemon-containerd.service --signal=SIGKILL &>/dev/null || true | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this diff be reduced already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
9e378a5
to
bab9881
Compare
The PR #2996 is to be used from now on. |
No description provided.