|
Lines 222-235
Link Here
|
| 222 |
Copy $verbose $force -m644 "/etc/$f" "etc/$f" |
222 |
Copy $verbose $force -m644 "/etc/$f" "etc/$f" |
| 223 |
done |
223 |
done |
| 224 |
|
224 |
|
|
|
225 |
timedatectl_file="/etc/localtime" |
| 226 |
if [ -f "${timedatectl_file}" ] |
| 227 |
then |
| 228 |
# for new systems with systemd |
| 229 |
# alterator must be taught to make /etc/localtime a symlink, see the bug https://bugzilla.altlinux.org/show_bug.cgi?id=32346 |
| 230 |
if [ -L "${timedatectl_file}" ] |
| 231 |
then |
| 232 |
if [ -w ./etc ] |
| 233 |
then |
| 234 |
test -f ".${timedatectl_file}" || ln -s "${timedatectl_file}" ".${timedatectl_file}" |
| 235 |
# set $timedatectl_file as an empty variable to avoid copying it as a file in the next loop |
| 236 |
# if /etc/localtime is not a symlink, e.g. it is a system with sysvinit, then this file will simply be copied in the next loop, otherwise it won't be copied in it |
| 237 |
timedatectl_file="" |
| 238 |
else |
| 239 |
if [ ! -d ./etc ] && [ -w ./ ]; then |
| 240 |
mkdir ./etc |
| 241 |
test -f ".${timedatectl_file}" || ln -s "${timedatectl_file}" ".${timedatectl_file}" |
| 242 |
timedatectl_file="" |
| 243 |
fi |
| 244 |
fi |
| 245 |
fi |
| 246 |
fi |
| 247 |
|
| 225 |
# optional config files |
248 |
# optional config files |
| 226 |
for f in /etc/localtime /var/nis/NIS_COLD_START; do |
249 |
for f in "${timedatectl_file}" /var/nis/NIS_COLD_START; do |
| 227 |
if [ -f "$f" ]; then |
250 |
if [ -f "$f" ]; then |
| 228 |
Copy $verbose $force -m644 "$f" ".$f" |
251 |
Copy $verbose $force -m644 "$f" ".$f" |
| 229 |
else |
252 |
else |
| 230 |
rm $verbose -f ".$f" |
253 |
rm $verbose -f ".$f" |
| 231 |
fi |
254 |
fi |
| 232 |
done |
255 |
done |
|
|
256 |
|
| 233 |
|
257 |
|
| 234 |
# NIS/NIS+ |
258 |
# NIS/NIS+ |
| 235 |
d=`nisdomainname` |
259 |
d=`nisdomainname` |