From 00f0b6b146bd13c2f648b993ea40964ae999a669 Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Wed, 30 Jul 2014 20:40:44 +0300 Subject: [PATCH] bashrc & zshrc: Function to erase mbr (or echo it) Closes #41 --- bashrc | 7 +++++++ zshrc | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/bashrc b/bashrc index 3b317cb6..22194b92 100644 --- a/bashrc +++ b/bashrc @@ -769,6 +769,13 @@ ssh-regen-host-keys () { ssh-keygen -t ed25519 -N "" -f /etc/ssh/ssh_host_ed25519_key } +# This function erases Master Boot Record from device +# Note: this is dangerous so this function will echo the command +# instad of running it! +erase-mbr() { + echo dd if=/dev/zero of=$1 bs=512 count=2 +} + # .custom if [ -f ~/.custom ]; then source ~/.custom diff --git a/zshrc b/zshrc index 857550e4..7c0bfd86 100644 --- a/zshrc +++ b/zshrc @@ -742,6 +742,13 @@ ssh-regen-host-keys () { ssh-keygen -t ed25519 -N "" -f /etc/ssh/ssh_host_ed25519_key } +# This function erases Master Boot Record from device +# Note: this is dangerous so this function will echo the command +# instad of running it! +erase-mbr() { + echo dd if=/dev/zero of=$1 bs=512 count=2 +} + # Source files for miscannellious modifications. # .custom