Skip to content

Instantly share code, notes, and snippets.

@coderofsalvation
Created January 8, 2014 21:00
Show Gist options
  • Save coderofsalvation/8324582 to your computer and use it in GitHub Desktop.
Save coderofsalvation/8324582 to your computer and use it in GitHub Desktop.
etect a livecd system, return 0 on success, 1 otherwise
# detect a livecd system, return 0 on success, 1 otherwise
function islivecd()
grep boot=live /proc/cmdline >/dev/null && return 0
grep boot=casper /proc/cmdline >/dev/null && return 0
return 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment