git://git.onelab.eu
/
bootcd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
97c1af3
)
use python3 in helper script embedded in bash
author
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Thu, 28 Nov 2019 14:40:37 +0000
(15:40 +0100)
committer
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Thu, 28 Nov 2019 14:40:37 +0000
(15:40 +0100)
prep.sh
patch
|
blob
|
history
diff --git
a/prep.sh
b/prep.sh
index
1765934
..
c6ac294
100755
(executable)
--- a/
prep.sh
+++ b/
prep.sh
@@
-51,7
+51,7
@@
pl_root_mkfedora $bootcd $pldistro $pkgsfile
pl_root_tune_image $bootcd
# Add site_admin console account to BootCD: with root priv, and self passwd
pl_root_tune_image $bootcd
# Add site_admin console account to BootCD: with root priv, and self passwd
-CRYPT_SA_PASSWORD=$(python
-c "import crypt, random, string; salt = [random.choice(string.letters + string.digits + \"./\") for i in range(0,8)] ; print crypt.crypt('site_admin', '\$1\$' + \"\".join(salt) + '\$'
)")
+CRYPT_SA_PASSWORD=$(python
3 -c "import crypt, random, string; salt = [random.choice(string.ascii_letters + string.digits + \"./\") for i in range(0,8)] ; print(crypt.crypt('site_admin', '\$1\$' + \"\".join(salt) + '\$')
)")
chroot ${bootcd} /usr/sbin/useradd -p "$CRYPT_SA_PASSWORD" -o -g 0 -u 0 -m site_admin
# Install ipnmac (for SuperMicro machines with IPMI)
chroot ${bootcd} /usr/sbin/useradd -p "$CRYPT_SA_PASSWORD" -o -g 0 -u 0 -m site_admin
# Install ipnmac (for SuperMicro machines with IPMI)