Skip to content

Commit

Permalink
using "echo foobar > filename" does not work, use tee instead
Browse files Browse the repository at this point in the history
I guess the execute_command appends another redirection to stdout when
calling the command. Therefore the first redirect is useless.
  • Loading branch information
Mrfai committed Jul 30, 2021
1 parent cd3a118 commit 71248d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/setup-storage/Commands.pm
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ sub build_raid_commands {
# do not remove ; from echo line. Otherwise it will not work
if ($FAI::do_init_tasks) { # no sync when initial installation
&FAI::push_command(
"echo frozen > /sys/block/md$id/md/sync_action",
"echo frozen | tee /sys/block/md$id/md/sync_action",
"exist_/dev/md$id", "nosync_md$id" );
}

Expand Down

0 comments on commit 71248d3

Please sign in to comment.