If you run an infrastructure style product, there should be a living will involve where the product will become open source upon the bankruptcy or shutdown style sale of the company.
For example, FoundationDB was bought by apple and the product was shuttered. Under a living will, the product would become open source, as it is no longer developed by the company.
I realise this may lead to a lower selling price, all things being equal, however people/companies are also more likely to trust you when you are small, as they have a greater chance of survival should you fail.
My personal feeling is that most of these products should be open source from the get go, and it will probably have to be this way going forward, however this is a reasonable middle ground.