Commit 9a652e40 authored by David Johnson's avatar David Johnson

Bug fix: add client_services as exported table, and fix quoting! Argh!

parent ff79d345
...@@ -194,6 +194,7 @@ REPLACE INTO exported_tables VALUES ('testsuite_preentables'); ...@@ -194,6 +194,7 @@ REPLACE INTO exported_tables VALUES ('testsuite_preentables');
REPLACE INTO exported_tables VALUES ('webdb_table_permissions'); REPLACE INTO exported_tables VALUES ('webdb_table_permissions');
REPLACE INTO exported_tables VALUES ('emulab_pubs_month_map'); REPLACE INTO exported_tables VALUES ('emulab_pubs_month_map');
REPLACE INTO exported_tables VALUES ('event_triggertypes'); REPLACE INTO exported_tables VALUES ('event_triggertypes');
REPLACE INTO exported_tables VALUES ('client_services');
-- --
-- Dumping data for table `foreign_keys` -- Dumping data for table `foreign_keys`
...@@ -1109,7 +1110,7 @@ REPLACE INTO table_regex VALUES ('virt_client_service_ctl','pid','text','redirec ...@@ -1109,7 +1110,7 @@ REPLACE INTO table_regex VALUES ('virt_client_service_ctl','pid','text','redirec
REPLACE INTO table_regex VALUES ('virt_client_service_ctl','service_idx','int','redirect','default:int',0,0,NULL); REPLACE INTO table_regex VALUES ('virt_client_service_ctl','service_idx','int','redirect','default:int',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_ctl','vnode','text','redirect','virt_nodes:vname',0,0,NULL); REPLACE INTO table_regex VALUES ('virt_client_service_ctl','vnode','text','redirect','virt_nodes:vname',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_ctl','whence','text','regex','^(first|every)$',0,0,NULL); REPLACE INTO table_regex VALUES ('virt_client_service_ctl','whence','text','regex','^(first|every)$',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','argv','text','regex','^[-ws\\\"]*$',0,0,NULL); REPLACE INTO table_regex VALUES ('virt_client_service_hooks','argv','text','regex','^[-\\w\\s\"]*$',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','eid','text','redirect','experiments:eid',0,0,NULL); REPLACE INTO table_regex VALUES ('virt_client_service_hooks','eid','text','redirect','experiments:eid',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','env','text','regex','^(boot|load)$',0,0,NULL); REPLACE INTO table_regex VALUES ('virt_client_service_hooks','env','text','regex','^(boot|load)$',0,0,NULL);
REPLACE INTO table_regex VALUES ('virt_client_service_hooks','fatal','int','redirect','default:boolean',0,0,NULL); REPLACE INTO table_regex VALUES ('virt_client_service_hooks','fatal','int','redirect','default:boolean',0,0,NULL);
......
...@@ -37,7 +37,7 @@ sub DoUpdate($$$) ...@@ -37,7 +37,7 @@ sub DoUpdate($$$)
DBQueryFatal("REPLACE INTO table_regex VALUES ('virt_blobs','filename',". DBQueryFatal("REPLACE INTO table_regex VALUES ('virt_blobs','filename',".
" 'text','redirect','default:tinytext',0,256,NULL)"); " 'text','redirect','default:tinytext',0,256,NULL)");
DBQueryFatal("REPLACE INTO table_regex VALUES ('virt_blobs','vblob_id',". DBQueryFatal("REPLACE INTO table_regex VALUES ('virt_blobs','vblob_id',".
" 'text','regex','^[-\\d\\w]+\$',0,40,NULL)"); " 'text','regex','^[-\\\\d\\\\w]+\$',0,40,NULL)");
return 0; return 0;
} }
......
...@@ -97,6 +97,8 @@ sub DoUpdate($$$) ...@@ -97,6 +97,8 @@ sub DoUpdate($$$)
} }
# db fill stuff # db fill stuff
DBQueryFatal("replace into exported_tables values ('client_services')");
my @sa = ("REPLACE INTO `client_services` VALUES ", my @sa = ("REPLACE INTO `client_services` VALUES ",
"(10,'rc.tbsetup','boot','every',1),", "(10,'rc.tbsetup','boot','every',1),",
"(20,'rc.ipod','boot','every',0),", "(20,'rc.ipod','boot','every',0),",
...@@ -135,7 +137,7 @@ sub DoUpdate($$$) ...@@ -135,7 +137,7 @@ sub DoUpdate($$$)
"(1050,'rc.subnodes','boot','every',1)"); "(1050,'rc.subnodes','boot','every',1)");
DBQueryFatal(join('',@sa)); DBQueryFatal(join('',@sa));
my @ra = ("('virt_client_service_ctl','alt_vblob_id','text','regex','^[-\\d\\w]+\$',0,40,NULL)", my @ra = ("('virt_client_service_ctl','alt_vblob_id','text','regex','^[-\\\\d\\\\w]+\$',0,40,NULL)",
"('virt_client_service_ctl','eid','text','redirect','experiments:eid',0,0,NULL)", "('virt_client_service_ctl','eid','text','redirect','experiments:eid',0,0,NULL)",
"('virt_client_service_ctl','enable','int','redirect','default:boolean',0,0,NULL)", "('virt_client_service_ctl','enable','int','redirect','default:boolean',0,0,NULL)",
"('virt_client_service_ctl','enable_hooks','int','redirect','default:boolean',0,0,NULL)", "('virt_client_service_ctl','enable_hooks','int','redirect','default:boolean',0,0,NULL)",
...@@ -145,13 +147,13 @@ sub DoUpdate($$$) ...@@ -145,13 +147,13 @@ sub DoUpdate($$$)
"('virt_client_service_ctl','service_idx','int','redirect','default:int',0,0,NULL)", "('virt_client_service_ctl','service_idx','int','redirect','default:int',0,0,NULL)",
"('virt_client_service_ctl','vnode','text','redirect','virt_nodes:vname',0,0,NULL)", "('virt_client_service_ctl','vnode','text','redirect','virt_nodes:vname',0,0,NULL)",
"('virt_client_service_ctl','whence','text','regex','^(first|every)\$',0,0,NULL)", "('virt_client_service_ctl','whence','text','regex','^(first|every)\$',0,0,NULL)",
"('virt_client_service_hooks','argv','text','regex','^[-\\w\\s\\\"]*\$',0,0,NULL)", "('virt_client_service_hooks','argv','text','regex','^[-\\\\w\\\\s\"]*\$',0,0,NULL)",
"('virt_client_service_hooks','eid','text','redirect','experiments:eid',0,0,NULL)", "('virt_client_service_hooks','eid','text','redirect','experiments:eid',0,0,NULL)",
"('virt_client_service_hooks','env','text','regex','^(boot|load)\$',0,0,NULL)", "('virt_client_service_hooks','env','text','regex','^(boot|load)\$',0,0,NULL)",
"('virt_client_service_hooks','fatal','int','redirect','default:boolean',0,0,NULL)", "('virt_client_service_hooks','fatal','int','redirect','default:boolean',0,0,NULL)",
"('virt_client_service_hooks','hook_op','text','regex','^(boot|shutdown|reconfig|reset)\$',0,0,NULL)", "('virt_client_service_hooks','hook_op','text','regex','^(boot|shutdown|reconfig|reset)\$',0,0,NULL)",
"('virt_client_service_hooks','hook_point','text','regex','^(pre|post)\$',0,0,NULL)", "('virt_client_service_hooks','hook_point','text','regex','^(pre|post)\$',0,0,NULL)",
"('virt_client_service_hooks','hook_vblob_id','text','regex','^[-\\d\\w]+\$',0,40,NULL)", "('virt_client_service_hooks','hook_vblob_id','text','regex','^[-\\\\d\\\\w]+\$',0,40,NULL)",
"('virt_client_service_hooks','op','text','regex','^(boot|shutdown|reconfig|reset)\$',0,0,NULL)", "('virt_client_service_hooks','op','text','regex','^(boot|shutdown|reconfig|reset)\$',0,0,NULL)",
"('virt_client_service_hooks','pid','text','redirect','projects:pid',0,0,NULL)", "('virt_client_service_hooks','pid','text','redirect','projects:pid',0,0,NULL)",
"('virt_client_service_hooks','point','text','regex','^(pre|post)\$',0,0,NULL)", "('virt_client_service_hooks','point','text','regex','^(pre|post)\$',0,0,NULL)",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment