--- autofs.orig 2007-04-16 23:31:54.000000000 -0300 +++ autofs 2007-04-16 23:42:53.000000000 -0300 @@ -275,25 +275,35 @@ function munge_options() BEGIN { RS="[, \n]" FS="=" - daemon_opts[ "timeout" ] = "timeout" - daemon_opts[ "t" ] = "timeout" + daemon_complex_opts[ "timeout" ] = "timeout" + daemon_complex_opts[ "t" ] = "timeout" + daemon_simple_opts[ "ghost" ] = "ghost" + daemon_simple_opts[ "g" ] = "ghost" } { if ( $0 ~ /^$/ ) next - if ( $1 in daemon_opts ) { - daemon[ daemon_opts[ $1 ] ] = $2 - } else if ($1 ~ /^D.+/) { - defines[ $1 ] = $2 - } else { - mount[NR] = $0 + if ( $1 in daemon_complex_opts ) { + daemon[ daemon_complex_opts[ $1 ] ] = $2 + } else if ( $1 in daemon_simple_opts ) { + daemon[ daemon_simple_opts[ $1 ] ] = "" + } else if ($1 ~ /^D.+/) { + defines[ $1 ] = $2 + } else { + mount[NR] = $0 } } END { if ( which ~ "^daemon$" ) { - if ( "timeout" in daemon ) { - printf "--timeout=%s\n", daemon["timeout"] + for ( parameter in daemon ) { + if ( parameter in daemon_complex_opts ) { + printf "--%s=%s ", parameter, daemon[ parameter ] + } else if ( parameter in daemon_simple_opts ) { + printf "--%s ", parameter + } } + if ( length( daemon ) ) + printf "\n" } else { for ( a in defines ) { printf "-%s=%s ", a, defines[a]