summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Rayner <james@archlinux.org>2008-12-22 12:20:08 +0100
committerJames Rayner <james@archlinux.org>2008-12-22 12:20:08 +0100
commit6cf09622e81aafe9697ba20a5e51f1ab66f481d6 (patch)
treec84602097548c33bfd0560675b81c7b20f77343a /src
parent80524ed6a8da6e4cc7f9309296185814e2f361aa (diff)
downloadnetctl-6cf09622e81aafe9697ba20a5e51f1ab66f481d6.tar.gz
netctl-6cf09622e81aafe9697ba20a5e51f1ab66f481d6.tar.xz
substitute usage of 'ls' with 'find'
Diffstat (limited to 'src')
-rw-r--r--src/network6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network b/src/network
index a05ab2c..7dbe536 100644
--- a/src/network
+++ b/src/network
@@ -51,7 +51,7 @@ validate_profile()
#
all_down()
{
- ls -1 $STATE_DIR/profiles/ | while read prof; do
+ for prof in find "$STATE_DIR/profiles" -maxdepth 1 -type f; do
profile_down $prof
done
rm_daemon net-profiles
@@ -65,7 +65,7 @@ all_suspend()
[[ ! -d $STATE_DIR ]] && mkdir -p $STATE_DIR/{interfaces,profiles}
[[ ! -d $STATE_DIR/suspend ]] && mkdir $STATE_DIR/suspend
- ls -1 $STATE_DIR/profiles/ | while read prof; do
+ for $prof in find "$STATE_DIR/profiles/" -maxdepth 1 -type f; do
cp $STATE_DIR/profiles/$prof $STATE_DIR/suspend/
profile_down $prof
done
@@ -76,7 +76,7 @@ all_suspend()
#
all_resume()
{
- ls -1 $STATE_DIR/suspend/ | while read prof; do
+ for $prof in find "$STATE_DIR/suspend/" -maxdepth 1 -type f; do
profile_up $prof
rm $STATE_DIR/suspend/$prof
done