File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ function func_exit_handler()
186186 }
187187
188188 # Restore ALSA settings after execution if state file exists
189- if [ -f /var/tmp/" ${SCRIPT_NAME} " .state ]; then
189+ if [ -f /var/tmp/" ${SCRIPT_NAME##*/ } " .state ]; then
190190 restore_alsa_state
191191 fi
192192
Original file line number Diff line number Diff line change @@ -1193,11 +1193,11 @@ perf_analyze()
11931193# Couple with save_machine_state.
11941194restore_alsa_state ()
11951195{
1196- dlogi " restore_alsa_state called in ${SCRIPT_NAME} "
1197- if [ -f /var/tmp/" ${SCRIPT_NAME} " .state ]; then
1196+ dlogi " restore_alsa_state called in ${SCRIPT_NAME##*/ } "
1197+ if [ -f /var/tmp/" ${SCRIPT_NAME##*/ } " .state ]; then
11981198 dlogi " restore_alsa_state found a relevant state file."
1199- alsactl restore --file /var/tmp/" ${SCRIPT_NAME} " .state --pedantic --no-ucm --no-init-fallback || dlogi " alsactl state restoration failed!"
1200- rm /var/tmp/" ${SCRIPT_NAME} " .state || dlogi " Old state file removal failed!"
1199+ alsactl restore --file /var/tmp/" ${SCRIPT_NAME##*/ } " .state --pedantic --no-ucm --no-init-fallback || dlogi " alsactl state restoration failed!"
1200+ rm /var/tmp/" ${SCRIPT_NAME##*/ } " .state || dlogi " Old state file removal failed!"
12011201 fi
12021202}
12031203
@@ -1208,6 +1208,6 @@ restore_alsa_state()
12081208# on an exit signal inside func_exit_handler.
12091209save_alsa_state ()
12101210{
1211- dlogi " save_alsa_state called in ${SCRIPT_NAME} "
1212- alsactl store --file /var/tmp/" ${SCRIPT_NAME} " .state || dlogi " alsactl state storage failed!"
1211+ dlogi " save_alsa_state called in ${SCRIPT_NAME##*/ } "
1212+ alsactl store --file /var/tmp/" ${SCRIPT_NAME##*/ } " .state || dlogi " alsactl state storage failed!"
12131213}
You can’t perform that action at this time.
0 commit comments