#!/tvbin/tivosh set db [dbopen] RetryTransaction { set swsystem [db $db open /SwSystem/ACTIVE] set tivoswversion [dbobj $swsystem get Name] set setup [db $db open /Setup] if {[PrefixMatches "2.5.5" $::tivoswversion]} { set uktivo 1 } else { set uktivo 0 } } RetryTransaction { if {$::uktivo} { set lconfig [db $db open /Setup] set postcode [dbobj $lconfig get PostalCode] } else { set lconfig [db $db open /State/LocationConfig] set postcode [dbobj $lconfig get PostalCode] } } dbclose $db RetryTransaction { puts stdout "$postcode" }