summaryrefslogtreecommitdiff
path: root/localuserconfig
diff options
context:
space:
mode:
Diffstat (limited to 'localuserconfig')
-rwxr-xr-xlocaluserconfig10
1 files changed, 5 insertions, 5 deletions
diff --git a/localuserconfig b/localuserconfig
index 82853c8..5ccb06d 100755
--- a/localuserconfig
+++ b/localuserconfig
@@ -1,9 +1,9 @@
#!/bin/sh
#
# /usr/local/bin/localuserconfig
-# Copyright 2004 Jonas Smedegaard <dr@jones.dk>
+# Copyright 2004-2006 Jonas Smedegaard <dr@jones.dk>
#
-# $Id: localuserconfig,v 1.7 2004-04-19 20:45:06 jonas Exp $
+# $Id: localuserconfig,v 1.8 2006-07-16 12:29:16 jonas Exp $
#
# Set/change local account settings
#
@@ -68,7 +68,7 @@ runmode="interactive"
user="`id -u -n`"
uid="`id -u`"
-HOME="`getent passwd \"$user\" | awk -F: '{print $6}' | head -1`"
+HOME="`getent passwd \"$user\" | awk -F: '{print $6}' | head -n 1`"
#TODO: Allow root to pass the above as options
# Safety checks (disable silently - the user can't correct it anyway)
@@ -98,8 +98,8 @@ fi
if [ "$do_server" = "yes" ]; then
server_edit="1"
if [ -r "$HOME/$server_userconf" ]; then
- server_username="$(grep '^username' $HOME/$server_userconf | awk -F= '{print $2}' | head -1 | awk '{print $1}')"
- server_password="$(grep '^password' $HOME/$server_userconf | awk -F= '{print $2}' | head -1 | awk '{print $1}')"
+ server_username="$(grep '^username' $HOME/$server_userconf | awk -F= '{print $2}' | head -n 1 | awk '{print $1}')"
+ server_password="$(grep '^password' $HOME/$server_userconf | awk -F= '{print $2}' | head -n 1 | awk '{print $1}')"
fi
if [ -n "$server_username" ]; then
server_edit=""