1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 14:58:08 +00:00

add a comment about bash vs dash. future refact needed

This commit is contained in:
diginc 2016-11-02 23:40:50 -05:00
parent 05e114173d
commit 699e299345

View File

@ -110,5 +110,8 @@ def run_script(Pihole, script, file="/test.sh"):
def _write_test_script(Pihole, script, file): def _write_test_script(Pihole, script, file):
''' Running the test script blocks directly can behave differently with regard to global vars ''' ''' Running the test script blocks directly can behave differently with regard to global vars '''
''' this is a cheap work around to that until all functions no longer rely on global variables ''' ''' this is a cheap work around to that until all functions no longer rely on global variables '''
''' found out why, dash: is the default in testinfra run() for Docker
Should try and convert the tests using this to firewalld style test
or override the run() function to use bash instead '''
Pihole.run('cat <<EOF> {file}\n{script}\nEOF'.format(file=file, script=script)) Pihole.run('cat <<EOF> {file}\n{script}\nEOF'.format(file=file, script=script))
Pihole.run('chmod +x {}'.format(file)) Pihole.run('chmod +x {}'.format(file))