  	SafeExit
  }
  
-@@ -261,7 +269,7 @@ if {$config(NoMBIMCheck)==0 && $usb(bNumConfigurations) > 1} {
+@@ -285,7 +293,7 @@ if {$config(NoMBIMCheck)==0 && $usb(bNum
  	if [CheckMBIM] {
  		Log " driver for MBIM devices is available"
  		Log "Find MBIM configuration number ..."

 	}
 }
 
@@ -498,9 +506,9 @@ return 1
 
 proc {ParseGlobalConfig} {} {
 
-global flags
+global flags setup
 set configFile ""
-set places [list /etc/usb_modeswitch.conf /etc/sysconfig/usb_modeswitch /etc/default/usb_modeswitch]
+set places [list $setup(etcdir)/usb_modeswitch.conf $setup(etcdir)/sysconfig/usb_modeswitch $setup(etcdir)/default/usb_modeswitch]
 foreach cfg $places {
 	if [file exists $cfg] {
 		set configFile $cfg
@@ -897,10 +905,12 @@ proc {SysLog} {msg} {
 
 global flags
 if {![info exists flags(logger)]} {

 		}
 	}
 	Log "Logger is $flags(logger)"
