I am running into an issue that appears to be un-resolvable. I have a need to pass in the function mnesia:change_table_copy_type(schema, node(), disc_copies). at the command line whe the db is created from the master node. the erl start is: erl -name NODE1 -mnesia extra_db_nodes \"['MASTER']\" -s mnesia When I start the shell then enter the function call everything works fine and I can then stop the shell and start the ejabber process normally. So what I need is a scripted method to get the DB setup and sync done.
I have tried many different methods to get the change_table_copy_type passed in with no success. the end goal is to be able to script the process of starting mnesia, pass in the function, and then quit out of the shell. Has anyone even tried this? I have tried redirects such as: erl -name NODE1 -mnesia extra_db_nodes \"['MASTER']\" -s mnesia <
This fails as the node is not started when the function call is passed in. I have tried using the "-run" option but get and error telling me the function is undef. Maybe I am not constructing the -run section correctly.