source: package_tags/xvm-iscsi-config/0.0.4/debian/transform_iscsid.conf.xvm.mako @ 1927

Last change on this file since 1927 was 1496, checked in by broder, 16 years ago

Create xvm-iscsi-config package

  • Property svn:executable set to *
File size: 659 bytes
Line 
1#!/usr/bin/perl -n
2BEGIN {
3  print <<'EOF';
4<%
5from invirt.config import structs as cfg
6%>
7EOF
8}
9
10s/^node.startup = manual/node.startup = automatic/m;
11# mako just generally doesn't deal well with lines that start with
12# hashes, so we'll strip them
13#
14# And empty lines too, just for cleanliness
15s/^#.*$//m;
16print unless /^$/;
17
18END {
19  print <<'EOF';
20node.session.auth.authmethod = CHAP
21node.session.auth.username = ${cfg.iscsi.username}
22node.session.auth.password = ${cfg.iscsi.password}
23
24discovery.sendtargets.auth.authmethod = CHAP
25discovery.sendtargets.auth.username = ${cfg.iscsi.username}
26discovery.sendtargets.auth.password = ${cfg.iscsi.password}
27EOF
28}
Note: See TracBrowser for help on using the repository browser.