Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/fluxbox/fluxbox.control.class.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2762 by niro, Tue Feb 2 14:58:04 2016 UTC revision 2769 by niro, Thu Feb 11 14:15:33 2016 UTC
# Line 117  set_fluxbox_autostart() Line 117  set_fluxbox_autostart()
117   return 1   return 1
118   fi   fi
119    
120   id=$(mysqldo "select id from cfg_autostart where serial='${serial}' and name='${name}';")   id=$(mysqldo "select id from cfg_fluxbox_autostart where serial='${serial}' and name='${name}';")
121   if [[ -n ${id} ]]   if [[ -n ${id} ]]
122   then   then
123   mysqldo "update cfg_autostart set name='${name}', exec='${exec}', enabled='${enabled}' where id=${id};"   mysqldo "update cfg_fluxbox_autostart set name='${name}', exec='${exec}', enabled='${enabled}' where id=${id};"
124   else   else
125   mysqldo "insert into cfg_autostart(serial,name,exec,enabled) values('${serial}','${name}','${exec}','${enabled}');"   mysqldo "insert into cfg_fluxbox_autostart(serial,name,exec,enabled) values('${serial}','${name}','${exec}','${enabled}');"
126   fi   fi
127  }  }
128    
# Line 138  push_config_80_fluxbox_autostart() Line 138  push_config_80_fluxbox_autostart()
138   local values   local values
139   local id   local id
140    
141   values=$(mysqldo "select id from cfg_autostart where serial='${serial}';")   values=$(mysqldo "select id from cfg_fluxbox_autostart where serial='${serial}';")
142   for id in ${values}   for id in ${values}
143   do   do
144   evaluate_table_xml cfg_autostart "where serial='${serial}'"   evaluate_table_xml cfg_fluxbox_autostart "where serial='${serial}'"
145   if [[ -z ${cfg_autostart_name} ]]   if [[ -z ${cfg_fluxbox_autostart_name} ]]
146   then   then
147   eecho "Name must not be empty id->'${id}'"   eecho "Name must not be empty id->'${id}'"
148   continue   continue
149   fi   fi
150   if [[ -z ${cfg_autostart_enabled} ]]   if [[ -z ${cfg_fluxbox_autostart_enabled} ]]
151   then   then
152   eecho "Enabled must not be empty id->'${id}'"   eecho "Enabled must not be empty id->'${id}'"
153   continue   continue
154   fi   fi
155   if [[ ${cfg_autostart_enabled} = 1 ]]   if [[ ${cfg_fluxbox_autostart_enabled} = 1 ]]
156   then   then
157   control_client "${serial}" set fluxbox.autostart add "${cfg_autostart_name}" "${cfg_autostart_exec}"   control_client "${serial}" set fluxbox.autostart add "${cfg_fluxbox_autostart_name}" "${cfg_fluxbox_autostart_exec}"
158   elif [[ ${cfg_autostart_enabled} = 0 ]]   elif [[ ${cfg_fluxbox_autostart_enabled} = 0 ]]
159   then   then
160   control_client "${serial}" set fluxbox.autostart del "${cfg_autostart_name}"   control_client "${serial}" set fluxbox.autostart del "${cfg_fluxbox_autostart_name}"
161   # remove from database too   # remove from database too
162   mysqldo "delete from cfg_autostart where id='${id}';"   mysqldo "delete from cfg_fluxbox_autostart where id='${id}';"
163   else   else
164   eecho "unknown enabled value id->'${id}', cfg_autostart_enabled -> '${cfg_autostart_enabled}'"   eecho "unknown enabled value id->'${id}', cfg_fluxbox_autostart_enabled -> '${cfg_fluxbox_autostart_enabled}'"
165   return 1   return 1
166   fi   fi
167   done   done

Legend:
Removed from v.2762  
changed lines
  Added in v.2769