Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 47885 - init script gawk "\.so" should be "\\.so"
init script gawk "\.so" should be "\\.so"
Product: Red Hat Linux
Classification: Retired
Component: apache (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-07-08 17:46 EDT by Tim Waugh
Modified: 2007-04-18 12:34 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-08-10 10:32:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Here's the fix (285 bytes, patch)
2001-07-08 17:46 EDT, Tim Waugh
no flags Details | Diff

  None (edit)
Description Tim Waugh 2001-07-08 17:46:31 EDT

Description of Problem:
[root@turmoil piranha]# service httpd start
Starting httpd: awk: cmd. line:1: warning: escape sequence `\.' treated 
as plain `.'
                                                           [  OK  ]

How Reproducible:

Steps to Reproduce:
1. service httpd start

Actual Results:
Error message

Expected Results:
No error message

Additional Information:
It's an initscript bug, which triggers a warning from the newer gawk 
Comment 1 Tim Waugh 2001-07-08 17:46:54 EDT
Created attachment 23007 [details]
Here's the fix
Comment 2 Gerald Teschl 2001-07-09 12:04:41 EDT
Maybe even better:
--- httpd.orig  Mon Jul  9 17:48:12 2001
+++ httpd       Mon Jul  9 18:06:52 2001
@@ -30,14 +30,12 @@
 # Change the major functions into functions.
 moduleargs() {
-       moduleargs=`
        /usr/bin/find ${moduledir} -type f -perm -0100 -name "*.so" | awk '{\
-               gsub("\.so$","");\
-               print "-DHAVE_" toupper($0)}'`
-       echo ${moduleargs}
+               gsub("\\.so$","");\
+               print "-DHAVE_" toupper($0)}'
 start() {
        echo -n $"Starting $prog: "
Comment 3 Glen Foster 2001-07-13 18:06:18 EDT
This defect considered MUST-FIX for Fairfax gold-release.
Comment 4 Michal Jaegermann 2001-07-21 20:24:38 EDT
Actually this fix is of "so-so" kind (as is the subject of this report).
Instead of abusing automatic conversions by awk of strings into
regexps, when strings are used in such role, one should really use
regexps and write /\.so$/, and similar for all first arguments of gsub.

Such "silent conversion" has its surprises and "\." escape is indeed
not valid _in a string_!  This form /\.so$/ is valid.  See for yourself.
Comment 5 Pekka Savola 2001-07-22 15:52:03 EDT
Also see #46221 in public rawhide section.
Comment 6 Nalin Dahyabhai 2001-08-06 17:57:03 EDT
Ah, thanks for the clarifications on awk syntax.  This should be resolved in
apache-1.3.20-10, coming soon to Raw Hide.
Comment 7 Tim Waugh 2001-08-10 10:32:29 EDT
Works for me.

Note You need to log in before you can comment on or make changes to this bug.