Commit 41227d23 authored by Adam Wujek's avatar Adam Wujek 💬

rootfs: use WRS_LOG_OTHER for wrs_auxclk at startup

An alternative to "set -o pipefail" in the
userspace/rootfs_override/etc/init.d/ is ${PIPESTATUS[0]},
but this is a bashism.
Signed-off-by: Adam Wujek's avatarAdam Wujek <>
parent e9b1a5f4
......@@ -274,6 +274,7 @@ config WRS_LOG_OTHER
Redirect output from other programs.
In the current version following programs uses this option:
This collective entry is to avoid number of entries in dot-config.
The string can be a pathname (e.g. /dev/kmsg) or a <facility>.<level>
spefification like "daemon.debug". An empty strings is used
......@@ -575,6 +575,7 @@ value is changed by the web interface, proper action is taken.
@t{CONFIG_WRS_LOG_OTHER} is currently used by:
@item wrs_watchdog
@item wrs_auxclk
@end itemize
Each value
can be a pathname, to select logging to file (and @t{/dev/kmsg}
......@@ -4,6 +4,7 @@
# First, read dot-config to get wrs_auxclk parameters
set -o pipefail
if [ -f $dotconfig ]; then
. $dotconfig
......@@ -33,11 +34,27 @@ if [ ! -z "$CONFIG_WRSAUXCLK_PPSHIFT" ]; then
p_ppshift="--ppshift "$CONFIG_WRSAUXCLK_PPSHIFT;
# if empty turn it to /dev/null
if [ -z $WRS_LOG ]; then
# if a pathname, use it
if echo "$WRS_LOG" | grep / > /dev/null; then
eval LOGPIPE=\" \> $WRS_LOG 2\>\&1 \";
# not a pathname: use verbatim
eval LOGPIPE=\" 2\>\&1 \| logger -t wr-switch -p $WRS_LOG\"
# execute wrs_auxclk
echo -n "Configuring external clock clk2: "
/wr/bin/wrs_auxclk $p_freq $p_duty $p_cshift $p_sigdel $p_ppshift > /dev/null 2>&1
if [ $? == 0 ]; then
echo "OK"
eval /wr/bin/wrs_auxclk $p_freq $p_duty $p_cshift $p_sigdel $p_ppshift $LOGPIPE
if [ $ret -eq 0 ]; then
echo "OK"
echo "Failed"
echo "Failed"
\ No newline at end of file
\ No newline at end of file
......@@ -189,7 +189,7 @@ int main(int argc, char *argv[])
printf("Applied settings:\n");
printf("%s: applied settings:\n", argv[0]);
print_settings(stdout, &calc);
return 0;
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