Added code to detect system

Change-Id: I1f14038e473308bc312549d899b5dff57c020dc4