Ethan,

> Tim,
> 
> These are just nits --
> 
> 945-947 - Can you turn these negatives into positives?  e.g. " ... that
> beadm is executing in the global zone."
> 

done.

> 950 - Would the zonename command ever not exist on the system?

I don't think so unless it was explicitly removed. It is delivered by SUNWcs 
which can't be removed unless a bunch of other packages were removed first. I 
tested removing zonename by renaming it and Python raises an OSError which is 
caught by the exception.

> If it didn't exist, or if it failed for whatever reason, I think we should
> err on the global side and assume we're in the global rather then a
> non-global shouldn't we?

If it doesn't exist an OSError is raised and execution halts. If it returns 
garbage then there is probably something inherently wrong and allowing beadm to 
continue probably isn't correct either. I don't think we should assume either 
and halt execution in either case.

> 
> 961 - Instead of this assumption, could you check the last char of
> zonename is indeed '\n', and remove it before comparing it to
> "global" ?

Yeah that is better.

Given your questions above I also changed /usr/bin/zonename -> /sbin/zonename 
in case usr is a separate file system and it isn't mounted or some other 
similar condition where the sym link doesn't exist.

webrev updated.

Thanks!
Tim

> 
> 
> thanks,
> -ethan
> 
> 
> Tim Knitter wrote:
>> Can two people please review the following:
>>
>> 3775 beadm should check that it is being run in a non-global zone
>>
>> http://defect.opensolaris.org/bz/show_bug.cgi?id=3775
>> http://cr.opensolaris.org/~tsk/3775/
>>
>> I tested these changes on bld 99 in both a non-global zone and a 
>> global zone.
>>
>> Thanks
>> Tim
>> _______________________________________________
>> caiman-discuss mailing list
>> caiman-discuss at opensolaris.org
>> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
>>   

Reply via email to