diff --git a/bdisk/bGPG.py b/bdisk/bGPG.py
index 34d39bf..aa6f2b4 100755
--- a/bdisk/bGPG.py
+++ b/bdisk/bGPG.py
@@ -52,13 +52,13 @@ def genGPG(conf):
s))
if mykey:
try:
- privkey = gpg.get_key(mykey, True)
+ pkeys.append(gpg.get_key(mykey, True))
except:
exit('{0}: ERROR: You specified using {1} but we have no secret key for that ID!'.format(
datetime.datetime.now(),
mykey))
else:
- for key in gpg.keylist(None,True):
+ for key in gpg.keylist(None, True):
if key.can_sign:
pkeys.append(key)
break
diff --git a/bdisk/bsync.py b/bdisk/bsync.py
index d04e708..1f6573b 100755
--- a/bdisk/bsync.py
+++ b/bdisk/bsync.py
@@ -37,7 +37,7 @@ def http(conf):
httpfiles['VERSION_INFO.txt'] = 'VERSION_INFO.txt'
if 'x86_64' in arch:
httpfiles['boot/{0}.64.kern'.format(bdisk['uxname'])] = '{0}.64.kern'.format(bdisk['uxname'])
- httpfiles['boot/{0}.64.img'.format(bdisk['uxname'])] = '{0}.32.img'.format(bdisk['uxname'])
+ httpfiles['boot/{0}.64.img'.format(bdisk['uxname'])] = '{0}.64.img'.format(bdisk['uxname'])
if 'i686' in arch:
httpfiles['boot/{0}.32.kern'.format(bdisk['uxname'])] = '{0}.32.kern'.format(bdisk['uxname'])
httpfiles['boot/{0}.32.img'.format(bdisk['uxname'])] = '{0}.32.img'.format(bdisk['uxname'])
@@ -48,7 +48,8 @@ def http(conf):
fulldest = '{0}/{1}'.format(httpdir, destpath)
parentdir = os.path.split(fulldest)[0]
os.makedirs(parentdir, exist_ok = True)
- shutil.copy2('{0}/{1}'.format(prepdir, k), '{0}/{1}'.format(httpdir, httpfiles[k]))
+ if os.path.lexists('{0}/{1}'.format(prepdir, k)):
+ shutil.copy2('{0}/{1}'.format(prepdir, k), '{0}/{1}'.format(httpdir, httpfiles[k]))
for root, dirs, files in os.walk(httpdir):
for d in dirs:
os.chown(os.path.join(root, d), uid, gid)
diff --git a/bdisk/host.py b/bdisk/host.py
index f243bd5..7045555 100755
--- a/bdisk/host.py
+++ b/bdisk/host.py
@@ -24,7 +24,7 @@ def getHostname():
hostname = platform.node()
return(hostname)
-def getConfig(conf_file='/etc/bdisk/build.ini'):
+def getConfig(conf_file = '/etc/bdisk/build.ini'):
conf = False
# define some defailt conf paths in case we're installed by
# a package manager. in order of the paths we should search.
@@ -48,6 +48,8 @@ def getConfig(conf_file='/etc/bdisk/build.ini'):
if os.path.isfile(p):
conf = p
break
+ else:
+ conf = conf_file
else:
conf = conf_file
defconf = os.path.abspath('{0}/../extra/dist.build.ini'.format(os.path.dirname(os.path.realpath(__file__))))
diff --git a/docs/manual/user/fslayout/TEMPLATES.adoc b/docs/manual/user/fslayout/TEMPLATES.adoc
index d036545..db9d92b 100644
--- a/docs/manual/user/fslayout/TEMPLATES.adoc
+++ b/docs/manual/user/fslayout/TEMPLATES.adoc
@@ -38,7 +38,7 @@ The `EFI/` directory is similar to <> above also, but needs fewer con
The `patches/` directory largely control branding of the mini ISO. They are in https://www.gnu.org/software/diffutils/manual/html_node/Unified-Format.html[unified diff^] (or "patch") format.
===== overlay/
-This directory contains *templated* overlays. These are intended to be templated by the user. See <> for more information on how to use this. Remember to suffix your template files with the `.j2` extension.
+This directory contains *templated* overlays. These are intended to be templated by the user. See <> for more information on how to use this. Remember to suffix your template files with the `.j2` extension.
===== pre-build.d/
This directory contains *templated* overlays. These are intended to not be managed by the user, as they handle configuration necessary for building an ISO. See <> for more information on this.
diff --git a/extra/pre-build.d/etc/issue b/extra/pre-build.d/etc/issue
deleted file mode 100644
index a891f34..0000000
--- a/extra/pre-build.d/etc/issue
+++ /dev/null
@@ -1,90 +0,0 @@
-[H[J
-MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0dc,.. ..;cxKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
-MMMMMMMMMMMMMMMMMMMMMMMMW0d:'. .,cx0WMMMMMMMMMMMMMMMMMMMMMMMM
-MMMMMMMMMMMMMMMMMMMMNx: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: ,MMMMMMMMMMMMMMMMMMM' :XXXXXXXXXXx O
-, .XXXx dxxxxxxxxxxxxxxd xXXXXXXXXXXXx dxxxxxxxxxxxxxxxxxd xXXXXXXXXXXK. c
-. :XXXXc'''''''''''''''''':XXXXXXXXXXXXXc'''''''''''''''''''''cXXXXXXXXXXXX, '
- lXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX: .
- lXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX; .
-. :XXXXXK0000000000000000000000000000000000000000000000000000KXXXXXXXXXXXXX, '
-, .XXXXXk .KXXXXXXXXXXXK. c
-x OXXXXXKKo .............................................. lXXXXXXXXXXXx 0
-W. ;XXXXXXXO ............................................... .XXXXXXXXXXX' .M
-Md kXXXXXXX, .............................................. KXXXXXXXXXd OM
-MM, .0XXXXXX0. .............................................. KXXXXXXXXO cMM
-MMN. .KXXXXXXk ............................................ ;XXXXXXXX0. ,WMM
-MMMX. .0XXXXXXk .........................'''............... .0XXXXXXXO. 'WMMM
-MMMMX. .kXXXXXXO. .................,cdkO0KKK0Oxo:'........ .kXXXXXXXd ,WMMMM
-MMMMMW; cKXXXXXK; .............'ckKKKKKKKKKKKKKK0x;.... '0XXXXXX0; cWMMMMM
-MMMMMMMk. .dXXXXXXx. ..........:OKKKKKKKKKKKKKKKKKKKo. .oXXXXXXKl .0MMMMMMM
-MMMMMMMMNc .xXXXXXKo. .......lKKKKKKKKKKKKKKKKKK0o' .dKXXXXXKd. lWMMMMMMMM
-MMMMMMMMMMK; .oKXXXXKd' ...:KKKKKKKKKKKKKKK0xc' .:kXXXXXX0l. cXMMMMMMMMMM
-MMMMMMMMMMMMXc ;xKXXXX0o,. .;ldxkkOkkxol:'. .,lOXXXXXXKd, .lNMMMMMMMMMMMM
-MMMMMMMMMMMMMMWx, ,lOXXXXX0xl:,.........';cok0X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MMMMMWd,..:Oc ,XXXXXXXXX: .WW.
- dW. lXK KMMMMMMMMMMMMMMK KXXXXXXXXXX. dMMMMMMMMMMMMMMMMM0 KXXXXXXXXK. dMk
- Wx KXK 0MMMMMMMMMMMMMMK KXXXXXXXXXX. xMMMMMMMMMMMMMMMMM0 KXXXXXXXXXc .MM.
-:M; ;XXX; ,xxxxxxxxxxxxxx: 'XXXXXXXXXXXc 'xxxxxxxxxxxxxxxxx; ,XXXXXXXXXXO KMl
-xM. oXXX0,,,,,,,,,,,,,,,,,,kXXXXXXXXXXXK;,,,,,,,,,,,,,,,,,,,,OXXXXXXXXXXX. xMO
-0M xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. oMK
-0M dXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. oMK
-xM. lXXXXXkdddddddddddddddddddddddddddddddddddddddddddddddddKXXXXXXXXXXXK kMk
-:Mc 'XXXXXc'. :XXXXXXXXXXXx XMc
- W0 OXXXXXX0 ............................................ OXXXXXXXXXX; ,MM.
- oM' ,XXXXXXX, ............................................ oXXXXXXXXXO 0Mx
- NK dXXXXXXO ........................................... lXXXXXXXXK. ;MN.
- ,Md kXXXXXXd .......................................... xXXXXXXXX; .NM;
- cMl kXXXXXXo ......................................... .KXXXXXXK; .XMl
- lMl dXXXXXXd ..................':lodxxdol:'......... .0XXXXXXK' .XMo
- :Wx :KXXXXXk. ..............,lkKKKKKKKKKKKKkc'.... .0XXXXXXk. 'NMc
- .XK. .xXXXXXK: ..........'oKKKKKKKKKKKKKKKKK0l.. lKXXXXX0; oMN'
- dWo .xXXXXXO; .......,OKKKKKKKKKKKKKKKKKkc. .c0XXXXX0c 'KMx
- .0Nc .oKXXXXO:. ...'0KKKKKKKKKKKKKK0d:. ,xKXXXXXO: .OM0'
- ,0No. ;xKXXXKx:. .;ldxkOOkkxol;'. 'cxKXXXXX0l. ,OMK;
- 'kWk, ,o0XXXXKko:,.........,:ldOKXXXXXKkc. .lXMO,
- .cKNx; .,cxOKXXXXXXXXXXXXXXXXXXKko:. .lKMKl.
- .cOWKd;. ..,;cllooollc:;'. 'ckNM0c.
- 'lONW0xl;.. .,:okXMNOo,
- .,cdOXWMWNXKK00KKXNMMWXOdc,.
- .,cokO00Okdc,.
-
-
-[H[J
-
-bdisk
-\d \t
-\4
-\4{tun0}
-https://bdisk.square-r00t.net/
diff --git a/extra/templates/VERSION_INFO.txt.j2 b/extra/templates/VERSION_INFO.txt.j2
index 817616c..85fb300 100644
--- a/extra/templates/VERSION_INFO.txt.j2
+++ b/extra/templates/VERSION_INFO.txt.j2
@@ -2,5 +2,5 @@ Version: {{ bdisk['ver'] }}
Build: {{ build['buildnum'] }}
Time: {{ build['time'] }}
Machine: {{ hostname }} ({{ distro }})
-User: {{ build['user'] }}{% if build['realuser'] is defined and build['realuser'] > 0 %} ({{ build['realuser'] }}){% endif %}
+User: {{ build['user'] }}{% if build['realuser'] is defined and build['realuser']|length > 0 %} ({{ build['realuser'] }}){% endif %}
diff --git a/extra/templates/overlay/etc/hostname.j2 b/extra/templates/overlay/etc/hostname.j2
new file mode 100644
index 0000000..0510d37
--- /dev/null
+++ b/extra/templates/overlay/etc/hostname.j2
@@ -0,0 +1 @@
+{{ bdisk['uxname']|lower }}.loc.lan