We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b31b66 commit 86bb44dCopy full SHA for 86bb44d
lib/functions.sh
@@ -5,6 +5,14 @@ f() { find . -type f -iname '*'$*'*'; }
5
6
if [[ $OSTYP == openwrt ]]; then
7
sc() { $SUDO /etc/init.d/$2 $1; }
8
+ function getent
9
+ {
10
+ if [[ $1 == passwd ]]; then
11
+ cat /etc/passwd
12
+ elif [[ $1 == group ]]; then
13
+ cat /etc/group
14
+ fi
15
+ }
16
elif [[ $OSTYP == alpine ]]; then
17
sc() {
18
if [[ $1 == enable ]]; then
lib/hostname.sh
@@ -29,16 +29,6 @@ get_fqdn() {
29
echo "$fqdn"
30
}
31
32
-# Function to simulate getent calls on OpenWrt
33
-function getent
34
-{
35
- if [[ $1 == passwd ]]; then
36
- cat /etc/passwd
37
- elif [[ $1 == group ]]; then
38
- cat /etc/group
39
- fi
40
-}
41
-
42
# Overwrite the hostname command to have a consistent response!
43
hostname () {
44
0 commit comments