Advertisement
s243a

LoadProfileData() (/usr/sbin/wag-profiles.sh - puppylinu)

Oct 2nd, 2016
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.67 KB | None | 0 0
  1. #Line 1036 of /usr/sbin/wag-profiles.sh
  2. # http://www.pearltrees.com/s243a/loadprofiledata-puppylinu/id16403091
  3. loadProfileData()
  4. {
  5.     # Dougal: added "SECURE" param, increment the "-A" below
  6.     PROFILE_TITLE="$1"
  7.     #PROFILE_DATA=`grep -A 11 -E "TITLE[0-9]+=\"${PROFILE_TITLE}\"" /etc/WAG/profile-conf`
  8.     ## Dougal: I'm not sure about the name -- maybe need to change underscores to spaces?
  9.     PROFILE_FILE=$( grep -l "TITLE=\"${PROFILE_TITLE}\"" ${PROFILES_DIR}/*.conf | head -n1 )
  10.     # add failsafe, in case there is none
  11.     [ "$PROFILE_FILE" ] || return
  12.     # Dougal: source config file
  13.     . "$PROFILE_FILE"
  14.     # now assign to PROFILE_ names...
  15.     assignProfileData
  16. } # end loadProfileData
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement