I would like to set d-i preseed/late_command in such way that a line containing alias instructions would get added to ~/.bashrc. That way alias would be active when I first login after the installation (typing 'myalias' would start script1).
d-i preseed/late_command string in-target echo "alias myalias='sh ./script1'" >> /home/user/.bashrc
but it failed with "Exit code 1"
d-i preseed/late_command string in-target sed -i '1i alias myalias='sh ./script1'' /home/user/.bashrc
but it failed with "Exit code 2"
I suspect that one of the attempts failed due some sort of syntax error.
Is there a way to make that alias run automatically when the user logs in? With "run automatically" I mean that alias would execute script1 as soon as the user logs on without requiring the user to type 'myalias'.
I'm using network install Wheezy ISO.