Skip to content
This repository has been archived by the owner on Nov 13, 2018. It is now read-only.

Fix postinstall prompting for TO user every time #1205

Merged
merged 2 commits into from
Mar 22, 2016

Conversation

rob05c
Copy link
Member

@rob05c rob05c commented Mar 22, 2016

Fixes #1204

@rob05c rob05c added this to the 1.4.2 milestone Mar 22, 2016
@@ -667,6 +672,7 @@ sub profiles_exist {
foreach my $profile (@$profiles_response) {
if ( !exists $initial_profiles{ $profile->{"name"} } ) {
print "Found existing profile (" . $profile->{"name"} . ")\n";
open( my $reconfigure_defaults_file, '>>', $reconfigure_defaults ) or die("Failed to open() $reconfigure_defaults: $!");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why create it both here and line 687? I think this one should go away...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this one goes away, the other one will never get called. We could remove the second open, because the profiles_exist() call will implicitly create it; but we'll still have to call profiles_exist() the second time, because the file doesn't get created on the first call. So
if ( profiles_exist() ) { open( my $reconfigure_defaults_file, '>>', $reconfigure_defaults ) or die("Failed to open() $reconfigure_defaults: $!"); }

could be changed to just profiles_exist().

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either way.. I think there should be just one..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, removed the other one.

@rob05c rob05c force-pushed the topostinstallnoadminreprompt branch from 42ed43a to 68a9dc6 Compare March 22, 2016 21:27
Changes postinstall .reconfigure_defaults touch to overwrite instead
of appending, per PR comment.
dangogh added a commit that referenced this pull request Mar 22, 2016
Fix postinstall prompting for TO user every time
@dangogh dangogh merged commit f0e87a2 into Comcast:master Mar 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants