aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorLeon M. George <leon@georgemail.eu>2022-05-06 00:03:54 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2023-02-07 21:05:57 +0100
commit6ce9f42b9819b93717d7425ca4135afec6ea43af (patch)
tree6758e14039ae26974bc411856923eefb5d4c2fec /package/base-files
parenta40a96e54b0d047d14d99bb715ee2dd94458acb6 (diff)
downloadupstream-6ce9f42b9819b93717d7425ca4135afec6ea43af.tar.gz
upstream-6ce9f42b9819b93717d7425ca4135afec6ea43af.tar.bz2
upstream-6ce9f42b9819b93717d7425ca4135afec6ea43af.zip
base-files: ipcalc.sh: use shebang to invoke awk
There's hardly an shell logic in ipcalc.sh and a $* that would garble parameter positions. Move the awk invokation to the shebang. A rename from "ipcalc.sh" to "ipcalc" is desirable but could prove tricky with packages in other repositories depending on the filename. Signed-off-by: Leon M. George <leon@georgemail.eu>
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/bin/ipcalc.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/package/base-files/files/bin/ipcalc.sh b/package/base-files/files/bin/ipcalc.sh
index b21b6e28dc..e818e67803 100755
--- a/package/base-files/files/bin/ipcalc.sh
+++ b/package/base-files/files/bin/ipcalc.sh
@@ -1,6 +1,5 @@
-#!/bin/sh
+#!/usr/bin/awk -f
-awk -f - $* <<EOF
function bitcount(c) {
c=and(rshift(c, 1),0x55555555)+and(c,0x55555555)
c=and(rshift(c, 2),0x33333333)+and(c,0x33333333)
@@ -82,4 +81,3 @@ BEGIN {
print "START="int2ip(start)
print "END="int2ip(end)
}
-EOF