Revision 47e547ca
b/common.sh.in | ||
---|---|---|
133 | 133 |
exit 1 |
134 | 134 |
fi |
135 | 135 |
lsb="/usr/bin/lsb_release" |
136 |
if [ -e $lsb ] ; then |
|
136 |
if [ -e ${target}/$lsb ] ; then
|
|
137 | 137 |
OPERATING_SYSTEM="$(chroot ${target} ${lsb} -i -s | tr "[:upper:]" "[:lower:]")" |
138 | 138 |
elif [ -e ${target}/etc/debian_version ] ; then |
139 | 139 |
OPERATING_SYSTEM="debian" |
... | ... | |
157 | 157 |
exit 1 |
158 | 158 |
fi |
159 | 159 |
lsb="/usr/bin/lsb_release" |
160 |
if [ -e $lsb ] ; then |
|
160 |
if [ -e ${target}/$lsb ] ; then
|
|
161 | 161 |
OS_RELEASE="$(chroot ${target} ${lsb} -r -s | tr "[:upper:]" "[:lower:]")" |
162 | 162 |
elif [ -e ${target}/etc/debian_version ] ; then |
163 | 163 |
OS_RELEASE="$(cat ${target}/etc/debian_version)" |
... | ... | |
358 | 358 |
esac |
359 | 359 |
} |
360 | 360 |
|
361 |
filesystem_check() { |
|
362 |
local target=$1 |
|
363 |
if [ -z "$target" ] ; then |
|
364 |
log_error "target not set for filesystem_check" |
|
365 |
exit 1 |
|
366 |
fi |
|
367 |
|
|
368 |
get_os $target |
|
369 |
|
|
370 |
if [ "${OPERATING_SYSTEM}" = "fedora" ]; then |
|
371 |
# we have to force a filesystem relabeling for SELinux after messing |
|
372 |
# around with the filesystem in fedora |
|
373 |
echo "Enforce an automatic relabeling in the initial boot process..." |
|
374 |
touch $target/.autorelabel |
|
375 |
fi |
|
376 |
} |
|
377 |
|
|
361 | 378 |
cleanup() { |
362 | 379 |
if [ ${#CLEANUP[*]} -gt 0 ]; then |
363 | 380 |
LAST_ELEMENT=$((${#CLEANUP[*]}-1)) |
b/create | ||
---|---|---|
105 | 105 |
setup_console $TARGET |
106 | 106 |
fi |
107 | 107 |
|
108 |
filesystem_check $TARGET |
|
109 |
|
|
108 | 110 |
RUN_PARTS=`which run-parts` |
109 | 111 |
|
110 | 112 |
if [ -n "$RUN_PARTS" -a -n "$CUSTOMIZE_DIR" -a -d "$CUSTOMIZE_DIR" ]; then |
Also available in: Unified diff