Permalink
Browse files

Use fakeroot mode to load files

  • Loading branch information...
1 parent 8aed7d6 commit 3e65084b9aca6871aedd185e80bfbf3b7453502f @raphink committed Feb 6, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 augload
View
@@ -9,15 +9,13 @@ LENS="$2"
shift 2
-FILE=$(readlink -f $FILE)
-
[[ -z $LENS || "x$1" = "x-h" || "x$1" = "x--help" ]] \
&& echo "Usage: $0 <file> <lens> [<cmd>[\n<cmd>]*]" \
&& exit 1
-cat <<EOF | augtool --noautoload -i
+cat <<EOF | augtool --noautoload -i -r $(dirname $FILE)
set /augeas/load/$LENS/lens "$LENS.lns"
-set /augeas/load/$LENS/incl "$FILE"
+set /augeas/load/$LENS/incl "$(basename $FILE)"
load
$(echo -e $@)
EOF

0 comments on commit 3e65084

Please sign in to comment.