Skip to content

Commit

Permalink
Add an example flashrd role
Browse files Browse the repository at this point in the history
This is all I needed to do now that the flashrd.site patches are in
flashrd's github repo.

This was as simple as `echo role-flashrd >> common/siteXX/roles`
and it just worked.  (I am sure that some things also needed to be
adjusted for the readonly filesystems but it boots up)
  • Loading branch information
afresh1 committed Apr 22, 2013
1 parent fc34cad commit e1005b9
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
18 changes: 18 additions & 0 deletions examples/role-flashrd/flashrd.site
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
active_interface() {
ifconfig | awk '
BEGIN { A = "" };
/^[^[:space:]]/ { if (A == "") { INT = $1 } };
/status: active/ { A=1 };
END { if (A != "") { sub(":", "", INT); print INT } }
'
}

int=`active_interface`

if [ -n "$int" ]; then
dhclient $int
else
echo Unable to find an active interface, no network enabled
fi

. /install.site
40 changes: 40 additions & 0 deletions examples/role-flashrd/siteXX/mtree
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# user: andrew
# machine: trillian.afresh1.com
# tree: /tmp/sxxu.rEcuDJGDe/role-flashrd
# date: Sun Apr 21 19:16:19 2013

# .
/set type=file uid=0 gid=0 mode=0644
. type=dir mode=0755
flashrd.site
flashrd.site~

# ./etc
etc type=dir mode=0755
# ./etc
..


# ./var
/set type=file uid=0 gid=0 mode=0755
var type=dir

# ./var/siteXX
/set type=file uid=0 gid=0 mode=0644
siteXX type=dir mode=0755
roles

# ./var/siteXX/role-flashrd
role-flashrd type=dir mode=0755
mtree
# ./var/siteXX/role-flashrd
..

# ./var/siteXX
..

# ./var
..

..

0 comments on commit e1005b9

Please sign in to comment.