X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=bin%2Flive-reconfigure;fp=bin%2Flive-reconfigure;h=0000000000000000000000000000000000000000;hb=96b643e3a4d8ee0dcf0526182190a9d4526c626b;hp=16cb51dfa4c35880a4364bc1f9f0c55c7b3591f0;hpb=84b32eaeb5388215f5a3913e20824004cae9cbce;p=live-boot-grml.git diff --git a/bin/live-reconfigure b/bin/live-reconfigure deleted file mode 100755 index 16cb51d..0000000 --- a/bin/live-reconfigure +++ /dev/null @@ -1,70 +0,0 @@ -#! /bin/sh - -set -e - -export PATH=/usr/bin:/usr/sbin:/sbin:/bin - -frontend=noninteractive - -findcommandinroot () -{ - ROOT="${1}/" - shift - - while [ "${#}" -ge 1 ] - do - P="${PATH}" - - while [ "${P}" ] - do - D=${P%%:*} - P=${P#*:} - - if [ "${D}" = "${P}" ] - then - P= - fi - - if [ -z "${D}" ] - then - D=. - fi - - if [ -x "${ROOT}${D}/${1}" ] - then - echo "${D}/${1}" - return 0 - fi - done - - shift - done - - return 1 -} - -runcommandinroot () -{ - C=$(findcommandinroot "${1}" "${2}") - ROOT="${1}" - - shift - shift - - [ -n "${C}" ] && chroot "${ROOT}" "${C}" "${@}" -} - -root="${1}" -package="${2}" - -version=$(runcommandinroot "${root}" dpkg-query -W --showformat='${Version}' "${package}" 2>/dev/null) || version="" - -if [ -z "${version}" ] -then - echo >&2 "${0}: package '${package}' is not installed" - exit 0 -fi - -runcommandinroot "${root}" dpkg-reconfigure -fnoninteractive --no-reload "${package}" - -exit 0