Permalink
Browse files

Small refactoring and comment about systemd compatibility.

  • Loading branch information...
1 parent b8e6090 commit e0eaf0e59fecfeffeb2cf8a396ef5cb653c1d133 @sphynx committed Jun 20, 2012
Showing with 9 additions and 7 deletions.
  1. +9 −7 wifi-select
View
@@ -7,22 +7,24 @@
# (C) Ivan N. Veselov <veselov@gmail.com> aka sphynx, 2009-2012
#
-. /etc/conf.d/netcfg
+#
+# do not use printhl (if not available) for better compatibility with `systemd`,
+# see the issue #3: https://github.com/sphynx/wifi-select/issues/3
+#
if [ -f /etc/rc.d/functions ]; then
. /etc/rc.d/functions
+ err() {
+ printhl "$*"
+ }
else
- function printhl()
- {
+ err() {
echo -e "$*"
}
fi
+. /etc/conf.d/netcfg
. /usr/lib/network/network
-err() {
- printhl "$*"
-}
-
#
# list network essids along with its encryption type (none/wep/wpa)
# e.g.: platinum=wpa

0 comments on commit e0eaf0e

Please sign in to comment.